Skip to content

Commit

Permalink
Don't write a finishing newline in silent mode (#677)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nirusu committed Sep 15, 2023
1 parent 02e6a73 commit 8453335
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/output/stdout.go
Expand Up @@ -307,7 +307,9 @@ func (s *Stdoutput) Finalize() error {
s.Error(err.Error())
}
}
fmt.Fprintf(os.Stderr, "\n")
if !s.config.Quiet {
fmt.Fprintf(os.Stderr, "\n")
}
return nil
}

Expand Down Expand Up @@ -384,16 +386,16 @@ func (s *Stdoutput) prepareInputsOneLine(res ffuf.Result) string {
inputs := ""
if len(s.fuzzkeywords) > 1 {
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
inputs = fmt.Sprintf("%s%s : %s ", inputs, k, strconv.Itoa(res.Position))
} else {
inputs = fmt.Sprintf("%s%s : %s ", inputs, k, res.Input[k])
}
}
} else {
for _, k := range s.fuzzkeywords {
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 {
Expand Down

0 comments on commit 8453335

Please sign in to comment.