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
@ -193,6 +193,7 @@ The only dependency of ffuf is Go 1.11. No dependencies outside of Go standard l
|
|||||||
- master
|
- master
|
||||||
- New
|
- New
|
||||||
- Changed
|
- Changed
|
||||||
|
- Limit the use of `-e` (extensions) to a single keyword: FUZZ
|
||||||
|
|
||||||
- v0.12
|
- v0.12
|
||||||
- New
|
- New
|
||||||
|
|||||||
2
main.go
2
main.go
@ -60,7 +60,7 @@ func main() {
|
|||||||
conf := ffuf.NewConfig(ctx)
|
conf := ffuf.NewConfig(ctx)
|
||||||
opts := cliOptions{}
|
opts := cliOptions{}
|
||||||
var ignored bool
|
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.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.Var(&opts.headers, "H", "Header `\"Name: Value\"`, separated by colon. Multiple -H flags are accepted.")
|
||||||
flag.StringVar(&conf.Url, "u", "", "Target URL")
|
flag.StringVar(&conf.Url, "u", "", "Target URL")
|
||||||
|
|||||||
@ -121,7 +121,7 @@ func (w *WordlistInput) readFile(path string) error {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
data = append(data, []byte(reader.Text()))
|
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 {
|
for _, ext := range w.config.Extensions {
|
||||||
data = append(data, []byte(reader.Text()+ext))
|
data = append(data, []byte(reader.Text()+ext))
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user