Log errors to --debug-log (#95)
This commit is contained in:
parent
7aad9c6051
commit
3ad8ce2716
@ -2,6 +2,7 @@ package ffuf
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"log"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
@ -163,12 +164,14 @@ func (j *Job) runTask(input map[string][]byte, position int, retried bool) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
j.Output.Error(fmt.Sprintf("Encountered an error while preparing request: %s\n", err))
|
j.Output.Error(fmt.Sprintf("Encountered an error while preparing request: %s\n", err))
|
||||||
j.incError()
|
j.incError()
|
||||||
|
log.Printf("%s", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
resp, err := j.Runner.Execute(&req)
|
resp, err := j.Runner.Execute(&req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if retried {
|
if retried {
|
||||||
j.incError()
|
j.incError()
|
||||||
|
log.Printf("%s", err)
|
||||||
} else {
|
} else {
|
||||||
j.runTask(input, position, true)
|
j.runTask(input, position, true)
|
||||||
}
|
}
|
||||||
@ -214,6 +217,7 @@ func (j *Job) CalibrateResponses() ([]Response, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
j.Output.Error(fmt.Sprintf("Encountered an error while preparing request: %s\n", err))
|
j.Output.Error(fmt.Sprintf("Encountered an error while preparing request: %s\n", err))
|
||||||
j.incError()
|
j.incError()
|
||||||
|
log.Printf("%s", err)
|
||||||
return results, err
|
return results, err
|
||||||
}
|
}
|
||||||
resp, err := j.Runner.Execute(&req)
|
resp, err := j.Runner.Execute(&req)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user