mirror of
https://github.com/ffuf/ffuf
synced 2025-01-08 09:28:43 +00:00
Fix issue when -request is used in conjunction with -u (#172)
This commit is contained in:
parent
a5d9bb5c18
commit
1e57e6d0a9
2 changed files with 8 additions and 1 deletions
|
@ -7,6 +7,7 @@
|
||||||
- Write POST request data properly to file when ran with `-od`
|
- Write POST request data properly to file when ran with `-od`
|
||||||
- Properly handle relative redirect urls with `-recursion`
|
- Properly handle relative redirect urls with `-recursion`
|
||||||
- Calculate req/sec correctly for when using recursion
|
- Calculate req/sec correctly for when using recursion
|
||||||
|
- When `-request` is used, allow the user to override URL using `-u`
|
||||||
|
|
||||||
- v1.0.1
|
- v1.0.1
|
||||||
- Changed
|
- Changed
|
||||||
|
|
8
main.go
8
main.go
|
@ -36,6 +36,7 @@ type cliOptions struct {
|
||||||
replayProxyURL string
|
replayProxyURL string
|
||||||
request string
|
request string
|
||||||
requestProto string
|
requestProto string
|
||||||
|
URL string
|
||||||
outputFormat string
|
outputFormat string
|
||||||
wordlists multiStringFlag
|
wordlists multiStringFlag
|
||||||
inputcommands multiStringFlag
|
inputcommands multiStringFlag
|
||||||
|
@ -67,7 +68,7 @@ func main() {
|
||||||
flag.StringVar(&opts.extensions, "e", "", "Comma separated list of extensions. Extends FUZZ keyword.")
|
flag.StringVar(&opts.extensions, "e", "", "Comma separated list of extensions. Extends FUZZ keyword.")
|
||||||
flag.BoolVar(&conf.DirSearchCompat, "D", false, "DirSearch wordlist compatibility mode. Used in conjunction with -e flag.")
|
flag.BoolVar(&conf.DirSearchCompat, "D", false, "DirSearch wordlist compatibility mode. Used in conjunction with -e flag.")
|
||||||
flag.Var(&opts.headers, "H", "Header `\"Name: Value\"`, separated by colon. Multiple -H flags are accepted.")
|
flag.Var(&opts.headers, "H", "Header `\"Name: Value\"`, separated by colon. Multiple -H flags are accepted.")
|
||||||
flag.StringVar(&conf.Url, "u", "", "Target URL")
|
flag.StringVar(&opts.URL, "u", "", "Target URL")
|
||||||
flag.Var(&opts.wordlists, "w", "Wordlist file path and (optional) keyword separated by colon. eg. '/path/to/wordlist:KEYWORD'")
|
flag.Var(&opts.wordlists, "w", "Wordlist file path and (optional) keyword separated by colon. eg. '/path/to/wordlist:KEYWORD'")
|
||||||
flag.BoolVar(&ignored, "k", false, "Dummy flag for backwards compatibility")
|
flag.BoolVar(&ignored, "k", false, "Dummy flag for backwards compatibility")
|
||||||
flag.StringVar(&opts.delay, "p", "", "Seconds of `delay` between requests, or a range of random delay. For example \"0.1\" or \"0.1-2.0\"")
|
flag.StringVar(&opts.delay, "p", "", "Seconds of `delay` between requests, or a range of random delay. For example \"0.1\" or \"0.1-2.0\"")
|
||||||
|
@ -335,6 +336,11 @@ func prepareConfig(parseOpts *cliOptions, conf *ffuf.Config) error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Prepare URL
|
||||||
|
if parseOpts.URL != "" {
|
||||||
|
conf.Url = parseOpts.URL
|
||||||
|
}
|
||||||
|
|
||||||
//Prepare headers
|
//Prepare headers
|
||||||
for _, v := range parseOpts.headers {
|
for _, v := range parseOpts.headers {
|
||||||
hs := strings.SplitN(v, ":", 2)
|
hs := strings.SplitN(v, ":", 2)
|
||||||
|
|
Loading…
Reference in a new issue