mirror of
https://github.com/ffuf/ffuf
synced 2024-11-10 06:04:17 +00:00
* 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
2 changed files with 9 additions and 8 deletions
|
@ -37,6 +37,7 @@
|
|||
* [noraj](https://pwn.by/noraj)
|
||||
* [oh6hay](https://github.com/oh6hay)
|
||||
* [penguinxoxo](https://github.com/penguinxoxo)
|
||||
* [p0dalirius](https://github.com/p0dalirius)
|
||||
* [putsi](https://github.com/putsi)
|
||||
* [SakiiR](https://github.com/SakiiR)
|
||||
* [seblw](https://github.com/seblw)
|
||||
|
|
|
@ -372,7 +372,7 @@ func (s *Stdoutput) PrintResult(res ffuf.Result) {
|
|||
s.resultJson(res)
|
||||
case s.config.Quiet:
|
||||
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)
|
||||
s.resultMultiline(res)
|
||||
default:
|
||||
|
@ -382,22 +382,22 @@ func (s *Stdoutput) PrintResult(res ffuf.Result) {
|
|||
|
||||
func (s *Stdoutput) prepareInputsOneLine(res ffuf.Result) string {
|
||||
inputs := ""
|
||||
if len(res.Input) > 1 {
|
||||
for k, v := range res.Input {
|
||||
if ffuf.StrInSlice(k, s.config.CommandKeywords) {
|
||||
if len(s.fuzzkeywords) > 1 {
|
||||
for _, k := range s.fuzzkeywords {
|
||||
if ffuf.StrInSlice(k, s.config.CommandKeywords) {
|
||||
// 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))
|
||||
} else {
|
||||
inputs = fmt.Sprintf("%s%s : %s ", inputs, k, v)
|
||||
inputs = fmt.Sprintf("%s%s : %s ", inputs, k, res.Input[k])
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for k, v := range res.Input {
|
||||
if ffuf.StrInSlice(k, s.config.CommandKeywords) {
|
||||
for _, k := range s.fuzzkeywords {
|
||||
if ffuf.StrInSlice(k, s.config.CommandKeywords) {
|
||||
// If we're using external command for input, display the position instead of input
|
||||
inputs = strconv.Itoa(res.Position)
|
||||
} else {
|
||||
inputs = string(v)
|
||||
inputs = string(res.Input[k])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue