Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running httpx with '%' character in path #331

Closed
shelld3v opened this issue Jul 28, 2021 · 11 comments · Fixed by #340 or #347
Closed

Error running httpx with '%' character in path #331

shelld3v opened this issue Jul 28, 2021 · 11 comments · Fixed by #340 or #347
Assignees
Labels
Status: Completed Nothing further to be done with this issue. Awaiting to be closed. Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@shelld3v
Copy link

Example

Working: httpx -l list -path /hell
Quitting: httpx -l list -path /%hell

This issue is similar to a bug I found in gobuster

@ehsandeep
Copy link
Member

@shelld3v httpx -l list -path "/%hell" is expected input.

@ehsandeep ehsandeep added the Type: Question A query or seeking clarification on parts of the spec. Probably doesn't need the attention of all. label Jul 30, 2021
@shelld3v
Copy link
Author

shelld3v commented Jul 30, 2021

@shelld3v httpx -l list -path "/%hell" is expected input.

I tried it too

@Mzack9999
Copy link
Member

@shelld3v go standard library doesn't allow unescaped non-ASCII characters in the request URI path. Therefore you need to use the -unsafe flag. For the same reason, another internal library was unable to parse this kind of URL correctly. This should be fixed in #340

@Mzack9999 Mzack9999 self-assigned this Aug 5, 2021
@Mzack9999 Mzack9999 added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Aug 5, 2021
@ehsandeep ehsandeep added Status: Completed Nothing further to be done with this issue. Awaiting to be closed. and removed Type: Question A query or seeking clarification on parts of the spec. Probably doesn't need the attention of all. labels Aug 6, 2021
@ehsandeep
Copy link
Member

@shelld3v Now non-ascii characters are supported with unsafe flag.

echo hackerone.com | ./httpx -path "/%hell" -unsafe -silent
https://hackerone.com/%hell

@shelld3v shelld3v closed this as completed Aug 6, 2021
@ehsandeep ehsandeep linked a pull request Aug 7, 2021 that will close this issue
@shelld3v
Copy link
Author

@ehsandeep Hi I think I still have some problems with this. I tried httpx -unsafe -l list.txt with list.txt contains:

http://example.com/%u

And it didn't work:(

@shelld3v shelld3v reopened this Aug 21, 2021
@ehsandeep
Copy link
Member

@shelld3v We still have to create a new release for these changes, check this PR - #370

It will work only if you build httpx from the dev version or wait for the new release.

@shelld3v
Copy link
Author

@ehsandeep Thanks for your response, I don't know why with httpx v1.1.1 I was able to do httpx -unsafe -path '/%invalid' -l list.txt (my original problem) but not echo 'http://example.com/%invalid' | httpx -unsafe 🤔

@ehsandeep
Copy link
Member

@shelld3v can confirm, it works as expected with paths but not with direct input.

@ehsandeep
Copy link
Member

@shelld3v should be fixed in the latest release.

@shelld3v
Copy link
Author

Hi I believe I'm facing the same issue with nuclei, can you re-check?

@ehsandeep
Copy link
Member

@shelld3v please open a new issue on Nuclei project with an example template, that will help to track the issue along with fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Completed Nothing further to be done with this issue. Awaiting to be closed. Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
3 participants