feroxbuster
feroxbuster copied to clipboard
[DOCS] add work around for items requiring a comma by using the config file
Describe the bug I'm working on a project where I need feroxbuster to send a specific header with a value that contains a comma. Unfortunately, because of the line below, the parameter will be split and the comma will create a new header.
https://github.com/epi052/feroxbuster/blob/bbfaddaedd1b4329a72bca933e44ada6463dafe3/src/parser.rs#L210
To Reproduce
$ cargo run -- --url '<myurl>' -H 'Accept: text/html,application/json'
Expected behavior
Create an header Accept
with the value text/html,application/json
Traceback / Error Output
In this case it create an error because it tries to use application/json
as a header name.
thread 'main' panicked at 'Could not rebuild client: invalid HTTP header name', src/config/container.rs:885:18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Environment:
- feroxbuster version: latest commit (bbfaddaedd1b4329a72bca933e44ada6463dafe3)
- OS Ubuntu 20.04
Additional context
I can't urlencode the comma, this make the header value invalid for the server.
Howdy, and thanks for submitting the report!
Can you try putting your header in ferox-config.toml to see if you can pass comma separated values that way?
Yes it works! I wasn't aware of this file.
Glad to hear it! So, given that we have a work-around/solution, and because the CLI has behaved this way since it was released, I would prefer not to change it.
Is the config file a suitable solution for your project?
The config file has some additional functionality talked about here and here.
Yes, this is one of the few projects where I had to specify a header with comma so this is not a problem to create a config file for these. But maybe this behavior should be described in the README (near the "Include Headers" section)?
sure, we can add a blurb about how to work around items requiring a comma by using the config file :+1:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
fixed: https://epi052.github.io/feroxbuster-docs/docs/examples/core-features/#include-headers