mirror of
https://github.com/ffuf/ffuf
synced 2024-12-01 15:49:18 +00:00
Log errors to --debug-log (#95)
This commit is contained in:
parent
7aad9c6051
commit
3ad8ce2716
1 changed files with 4 additions and 0 deletions
|
@ -2,6 +2,7 @@ package ffuf
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"math/rand"
|
||||
"sync"
|
||||
"time"
|
||||
|
@ -163,12 +164,14 @@ func (j *Job) runTask(input map[string][]byte, position int, retried bool) {
|
|||
if err != nil {
|
||||
j.Output.Error(fmt.Sprintf("Encountered an error while preparing request: %s\n", err))
|
||||
j.incError()
|
||||
log.Printf("%s", err)
|
||||
return
|
||||
}
|
||||
resp, err := j.Runner.Execute(&req)
|
||||
if err != nil {
|
||||
if retried {
|
||||
j.incError()
|
||||
log.Printf("%s", err)
|
||||
} else {
|
||||
j.runTask(input, position, true)
|
||||
}
|
||||
|
@ -214,6 +217,7 @@ func (j *Job) CalibrateResponses() ([]Response, error) {
|
|||
if err != nil {
|
||||
j.Output.Error(fmt.Sprintf("Encountered an error while preparing request: %s\n", err))
|
||||
j.incError()
|
||||
log.Printf("%s", err)
|
||||
return results, err
|
||||
}
|
||||
resp, err := j.Runner.Execute(&req)
|
||||
|
|
Loading…
Reference in a new issue