mirror of
https://github.com/ffuf/ffuf
synced 2024-11-10 06:04:17 +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
|
||||
outputFormat string
|
||||
ignoreBody bool
|
||||
wordlists multiStringFlag
|
||||
wordlists wordlistFlag
|
||||
inputcommands multiStringFlag
|
||||
headers multiStringFlag
|
||||
cookies multiStringFlag
|
||||
|
@ -52,12 +52,22 @@ type cliOptions struct {
|
|||
}
|
||||
|
||||
type multiStringFlag []string
|
||||
type wordlistFlag []string
|
||||
|
||||
func (m *multiStringFlag) String() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *wordlistFlag) String() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *multiStringFlag) Set(value string) error {
|
||||
*m = append(*m, value)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *wordlistFlag) Set(value string) error {
|
||||
delimited := strings.Split(value, ",")
|
||||
|
||||
if len(delimited) > 1 {
|
||||
|
|
Loading…
Reference in a new issue