mirror of https://github.com/daffainfo/nuclei.git
The debug flags do not work correctly with headless templates (#3030)
* added check on BaseURL * added debug flag instead on info * added also debug response flag * code refactoringdev
parent
71cdb1c335
commit
aaae68ee50
|
@ -110,14 +110,16 @@ func (request *Request) executeRequestWithPayloads(inputURL string, payloads map
|
|||
gologger.Verbose().Msgf("Sent Headless request to %s", inputURL)
|
||||
|
||||
reqBuilder := &strings.Builder{}
|
||||
if request.options.Options.Debug || request.options.Options.DebugRequests {
|
||||
if request.options.Options.Debug || request.options.Options.DebugRequests || request.options.Options.DebugResponse {
|
||||
gologger.Info().Msgf("[%s] Dumped Headless request for %s", request.options.TemplateID, inputURL)
|
||||
|
||||
for _, act := range request.Steps {
|
||||
reqBuilder.WriteString(act.String())
|
||||
reqBuilder.WriteString("\n")
|
||||
actStepStr := act.String()
|
||||
actStepStr = strings.ReplaceAll(actStepStr, "{{BaseURL}}", inputURL)
|
||||
reqBuilder.WriteString("\t" + actStepStr + "\n")
|
||||
}
|
||||
gologger.Print().Msgf(reqBuilder.String())
|
||||
gologger.Debug().Msgf(reqBuilder.String())
|
||||
|
||||
}
|
||||
|
||||
var responseBody string
|
||||
|
|
Loading…
Reference in New Issue