mirror of
https://github.com/ffuf/ffuf
synced 2024-12-12 04:52:29 +00:00
Fixed comma parsing bugs in non-wordlist cli arguments (#298)
This commit is contained in:
parent
a71f1c0105
commit
f3bcb50e3a
1 changed files with 11 additions and 1 deletions
12
main.go
12
main.go
|
@ -42,7 +42,7 @@ type cliOptions struct {
|
||||||
URL string
|
URL string
|
||||||
outputFormat string
|
outputFormat string
|
||||||
ignoreBody bool
|
ignoreBody bool
|
||||||
wordlists multiStringFlag
|
wordlists wordlistFlag
|
||||||
inputcommands multiStringFlag
|
inputcommands multiStringFlag
|
||||||
headers multiStringFlag
|
headers multiStringFlag
|
||||||
cookies multiStringFlag
|
cookies multiStringFlag
|
||||||
|
@ -52,12 +52,22 @@ type cliOptions struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type multiStringFlag []string
|
type multiStringFlag []string
|
||||||
|
type wordlistFlag []string
|
||||||
|
|
||||||
func (m *multiStringFlag) String() string {
|
func (m *multiStringFlag) String() string {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *wordlistFlag) String() string {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
func (m *multiStringFlag) Set(value string) error {
|
func (m *multiStringFlag) Set(value string) error {
|
||||||
|
*m = append(*m, value)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *wordlistFlag) Set(value string) error {
|
||||||
delimited := strings.Split(value, ",")
|
delimited := strings.Split(value, ",")
|
||||||
|
|
||||||
if len(delimited) > 1 {
|
if len(delimited) > 1 {
|
||||||
|
|
Loading…
Reference in a new issue