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

Wordlist with special chars may cause errors on crates.io version of the tool #41

Closed
sp1nn4k3r opened this issue Jun 4, 2023 · 16 comments
Labels
bug Something isn't working

Comments

@sp1nn4k3r
Copy link

5/18 thread 'main' panicked at 'called Result::unwrap() on an Err value: http::Error(InvalidHeaderName)

Is possible to override this error? Or maybe a flag to clean the wordlist before bf starting?

Thank you

@Sh1Yo
Copy link
Owner

Sh1Yo commented Jun 4, 2023

Hi, thanks for the issue. Can you provide the word that causes this error and the version(main or from crates.io) of the tool?

@sp1nn4k3r
Copy link
Author

Latest version of the tool main version installed with "cargo install x8" cargo version = cargo 1.70.0 (ec8a8a0ca 2023-04-25). The word I am not sure but it gives that error also with Wordlists provided by you in the readme. Started to think is a cargo release problem.

Thanks

@sp1nn4k3r
Copy link
Author

Error keep going with --header flag and without it.

@sp1nn4k3r
Copy link
Author

Gzip main version go well on parameters but stop on --headers flag without error.IMG_20230604_195645.jpg

@Sh1Yo
Copy link
Owner

Sh1Yo commented Jun 4, 2023

Thanks, I'll check it in my free time and return to this issue. For now, you can manually remove the words with special characters from the wordlist. I think they're the main reason of the error.

@sp1nn4k3r
Copy link
Author

Perfect. Thank you again

@Sh1Yo
Copy link
Owner

Sh1Yo commented Jun 6, 2023

Gzip main version go well on parameters but stop on --headers flag without error.IMG_20230604_195645.jpg

It's fine. Sometimes a server may refuse to send an answer or send it after a delay in case some special or invalid headers are sent. You can try to decrease the value of --timeout if it bothers you.

@Sh1Yo Sh1Yo changed the title Error with Wordlists Wordlist with special chars may cause errors on crates.io version of the tool Jun 6, 2023
@Sh1Yo Sh1Yo added the bug Something isn't working label Jun 6, 2023
@mAminP
Copy link

mAminP commented Jun 7, 2023

Hi

I also encounter this error when I use the following wordlist. I tried to remove some characters from the wordlist, but I didn't get any result

wordlsit:
https://wordlists-cdn.assetnote.io/data/automated/httparchive_parameters_top_1m_2023_05_28.txt

Error:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: http::Error(InvalidUri(InvalidUriChar))', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/x8-4.3.0/src/network/request.rs:325:58 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

commad:

x8 -u <domain.tld> -w <wordlist> -c 1 -m 20

@mAminP
Copy link

mAminP commented Jun 12, 2023

Hi again

I used this command to fix the problem.
The problem is solved now, but I think this method makes me miss some words

cat <WORDLIST> | jq -Rr @uri | tee <NEW_WORDLIST>

@dualfade
Copy link

^^ confirmed worked for me as well.

@sp1nn4k3r
Copy link
Author

sp1nn4k3r commented Jun 18, 2023 via email

@mAminP
Copy link

mAminP commented Jun 22, 2023

Hi again

I used this command to fix the problem. The problem is solved now, but I think this method makes me miss some words

cat <WORDLIST> | jq -Rr @uri | tee <NEW_WORDLIST>

Hiiii Again :)

I recently found out that x8 itself has a flag to solve this problem

flag:--encode

final command: x8 -u <domain.tld> -w <wordlist> -c 1 -m 20 --encode

@sp1nn4k3r
Copy link
Author

sp1nn4k3r commented Jun 22, 2023 via email

@Sh1Yo
Copy link
Owner

Sh1Yo commented Jun 27, 2023

Hi @sp1nn4k3r and @mAminP. Please, don't try to use the --encode flag to solve the issue. It encodes the whole query and therefore the server won't recognize the parameters. I'll try to fix the issue this week and return with an update

@sp1nn4k3r
Copy link
Author

sp1nn4k3r commented Jun 27, 2023 via email

@Sh1Yo
Copy link
Owner

Sh1Yo commented Jun 30, 2023

The new version of the tool from crates.io (that gets installed with cargo install) now urlencodes parameters' keys and ignores invalid headers that solves the issue.

@Sh1Yo Sh1Yo closed this as completed Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants