diff --git a/README.md b/README.md index ebe5b4d..09aecfa 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/main.go b/main.go index d7a3fe9..8437545 100644 --- a/main.go +++ b/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") diff --git a/pkg/input/wordlist.go b/pkg/input/wordlist.go index 4240652..73ccd28 100644 --- a/pkg/input/wordlist.go +++ b/pkg/input/wordlist.go @@ -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)) }