* Fixed incorrect len() in pkg/output/stdout.go::PrintResult() * Fixed incorrect iteration on res.Input in pkg/output/stdout.go::prepareInputsOneLine(), Fixes #645 * Update CONTRIBUTORS.md * Update pkg/output/stdout.go --------- Co-authored-by: Joona Hoikkala <5235109+joohoi@users.noreply.github.com>
This commit is contained in:
parent
b2c1f9471f
commit
627c8710cd
@ -37,6 +37,7 @@
|
|||||||
* [noraj](https://pwn.by/noraj)
|
* [noraj](https://pwn.by/noraj)
|
||||||
* [oh6hay](https://github.com/oh6hay)
|
* [oh6hay](https://github.com/oh6hay)
|
||||||
* [penguinxoxo](https://github.com/penguinxoxo)
|
* [penguinxoxo](https://github.com/penguinxoxo)
|
||||||
|
* [p0dalirius](https://github.com/p0dalirius)
|
||||||
* [putsi](https://github.com/putsi)
|
* [putsi](https://github.com/putsi)
|
||||||
* [SakiiR](https://github.com/SakiiR)
|
* [SakiiR](https://github.com/SakiiR)
|
||||||
* [seblw](https://github.com/seblw)
|
* [seblw](https://github.com/seblw)
|
||||||
|
|||||||
@ -372,7 +372,7 @@ func (s *Stdoutput) PrintResult(res ffuf.Result) {
|
|||||||
s.resultJson(res)
|
s.resultJson(res)
|
||||||
case s.config.Quiet:
|
case s.config.Quiet:
|
||||||
s.resultQuiet(res)
|
s.resultQuiet(res)
|
||||||
case len(res.Input) > 1 || s.config.Verbose || len(s.config.OutputDirectory) > 0 || len(res.ScraperData) > 0:
|
case len(s.fuzzkeywords) > 1 || s.config.Verbose || len(s.config.OutputDirectory) > 0 || len(res.ScraperData) > 0:
|
||||||
// Print a multi-line result (when using multiple input keywords and wordlists)
|
// Print a multi-line result (when using multiple input keywords and wordlists)
|
||||||
s.resultMultiline(res)
|
s.resultMultiline(res)
|
||||||
default:
|
default:
|
||||||
@ -382,22 +382,22 @@ func (s *Stdoutput) PrintResult(res ffuf.Result) {
|
|||||||
|
|
||||||
func (s *Stdoutput) prepareInputsOneLine(res ffuf.Result) string {
|
func (s *Stdoutput) prepareInputsOneLine(res ffuf.Result) string {
|
||||||
inputs := ""
|
inputs := ""
|
||||||
if len(res.Input) > 1 {
|
if len(s.fuzzkeywords) > 1 {
|
||||||
for k, v := range res.Input {
|
for _, k := range s.fuzzkeywords {
|
||||||
if ffuf.StrInSlice(k, s.config.CommandKeywords) {
|
if ffuf.StrInSlice(k, s.config.CommandKeywords) {
|
||||||
// If we're using external command for input, display the position instead of input
|
// If we're using external command for input, display the position instead of input
|
||||||
inputs = fmt.Sprintf("%s%s : %s ", inputs, k, strconv.Itoa(res.Position))
|
inputs = fmt.Sprintf("%s%s : %s ", inputs, k, strconv.Itoa(res.Position))
|
||||||
} else {
|
} else {
|
||||||
inputs = fmt.Sprintf("%s%s : %s ", inputs, k, v)
|
inputs = fmt.Sprintf("%s%s : %s ", inputs, k, res.Input[k])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for k, v := range res.Input {
|
for _, k := range s.fuzzkeywords {
|
||||||
if ffuf.StrInSlice(k, s.config.CommandKeywords) {
|
if ffuf.StrInSlice(k, s.config.CommandKeywords) {
|
||||||
// If we're using external command for input, display the position instead of input
|
// If we're using external command for input, display the position instead of input
|
||||||
inputs = strconv.Itoa(res.Position)
|
inputs = strconv.Itoa(res.Position)
|
||||||
} else {
|
} else {
|
||||||
inputs = string(v)
|
inputs = string(res.Input[k])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user