mirror of https://github.com/daffainfo/nuclei.git
use request numbering as per template definition in req-condition (#2135)
* use original request number instead of current iteration in request-condition * add previousEvent tracking back for request condition Co-authored-by: sandeep <sandeep@projectdiscovery.io>dev
parent
e575f53be7
commit
e7591ec8b3
|
@ -240,7 +240,6 @@ func (request *Request) ExecuteWithResults(reqURL string, dynamicValues, previou
|
||||||
generator := request.newGenerator()
|
generator := request.newGenerator()
|
||||||
|
|
||||||
var gotDynamicValues map[string][]string
|
var gotDynamicValues map[string][]string
|
||||||
requestCount := 1
|
|
||||||
var requestErr error
|
var requestErr error
|
||||||
for {
|
for {
|
||||||
// returns two values, error and skip, which skips the execution for the request instance.
|
// returns two values, error and skip, which skips the execution for the request instance.
|
||||||
|
@ -285,7 +284,7 @@ func (request *Request) ExecuteWithResults(reqURL string, dynamicValues, previou
|
||||||
} else {
|
} else {
|
||||||
callback(event)
|
callback(event)
|
||||||
}
|
}
|
||||||
}, requestCount)
|
}, generator.currentIndex)
|
||||||
|
|
||||||
// If a variable is unresolved, skip all further requests
|
// If a variable is unresolved, skip all further requests
|
||||||
if err == errStopExecution {
|
if err == errStopExecution {
|
||||||
|
@ -297,7 +296,6 @@ func (request *Request) ExecuteWithResults(reqURL string, dynamicValues, previou
|
||||||
}
|
}
|
||||||
requestErr = err
|
requestErr = err
|
||||||
}
|
}
|
||||||
requestCount++
|
|
||||||
request.options.Progress.IncrementRequests()
|
request.options.Progress.IncrementRequests()
|
||||||
|
|
||||||
// If this was a match, and we want to stop at first match, skip all further requests.
|
// If this was a match, and we want to stop at first match, skip all further requests.
|
||||||
|
|
Loading…
Reference in New Issue