mirror of
https://github.com/ffuf/ffuf
synced 2024-11-10 06:04:17 +00:00
Limit the use of -e to a single keyword (#106)
* Limit the use of extension to a single wordlist * Update README
This commit is contained in:
parent
d04a2d80ae
commit
c33a431716
3 changed files with 3 additions and 2 deletions
|
@ -193,6 +193,7 @@ The only dependency of ffuf is Go 1.11. No dependencies outside of Go standard l
|
|||
- master
|
||||
- New
|
||||
- Changed
|
||||
- Limit the use of `-e` (extensions) to a single keyword: FUZZ
|
||||
|
||||
- v0.12
|
||||
- New
|
||||
|
|
2
main.go
2
main.go
|
@ -60,7 +60,7 @@ func main() {
|
|||
conf := ffuf.NewConfig(ctx)
|
||||
opts := cliOptions{}
|
||||
var ignored bool
|
||||
flag.StringVar(&opts.extensions, "e", "", "Comma separated list of extensions to apply. Each extension provided will extend the wordlist entry once.")
|
||||
flag.StringVar(&opts.extensions, "e", "", "Comma separated list of extensions to apply. Each extension provided will extend the wordlist entry once. Only extends a wordlist with (default) FUZZ keyword.")
|
||||
flag.BoolVar(&conf.DirSearchCompat, "D", false, "DirSearch style wordlist compatibility mode. Used in conjunction with -e flag. Replaces %EXT% in wordlist entry with each of the extensions provided by -e.")
|
||||
flag.Var(&opts.headers, "H", "Header `\"Name: Value\"`, separated by colon. Multiple -H flags are accepted.")
|
||||
flag.StringVar(&conf.Url, "u", "", "Target URL")
|
||||
|
|
|
@ -121,7 +121,7 @@ func (w *WordlistInput) readFile(path string) error {
|
|||
}
|
||||
} else {
|
||||
data = append(data, []byte(reader.Text()))
|
||||
if len(w.config.Extensions) > 0 {
|
||||
if w.keyword == "FUZZ" && len(w.config.Extensions) > 0 {
|
||||
for _, ext := range w.config.Extensions {
|
||||
data = append(data, []byte(reader.Text()+ext))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue