mirror of https://github.com/daffainfo/nuclei.git
Fixed a bug with workflow output
parent
fe7a5def29
commit
27ef27a51b
|
@ -25,9 +25,8 @@ func (r *Runner) processTemplateWithList(template *templates.Template) bool {
|
|||
match, err := template.Executer.Execute(URL)
|
||||
if err != nil {
|
||||
gologger.Warning().Msgf("[%s] Could not execute step: %s\n", r.colorizer.BrightBlue(template.ID), err)
|
||||
} else {
|
||||
results.CAS(false, match)
|
||||
}
|
||||
results.CAS(false, match)
|
||||
}(URL)
|
||||
return nil
|
||||
})
|
||||
|
@ -49,9 +48,8 @@ func (r *Runner) processWorkflowWithList(template *templates.Template) bool {
|
|||
match, err := template.RunWorkflow(URL)
|
||||
if err != nil {
|
||||
gologger.Warning().Msgf("[%s] Could not execute step: %s\n", r.colorizer.BrightBlue(template.ID), err)
|
||||
} else {
|
||||
results.CAS(false, match)
|
||||
}
|
||||
results.CAS(false, match)
|
||||
}(URL)
|
||||
return nil
|
||||
})
|
||||
|
|
|
@ -9,7 +9,7 @@ func (w *Workflow) RunWorkflow(input string) (bool, error) {
|
|||
for _, template := range w.Workflows {
|
||||
err := w.runWorkflowStep(template, input, results)
|
||||
if err != nil {
|
||||
return false, err
|
||||
return results.Load(), err
|
||||
}
|
||||
}
|
||||
return results.Load(), nil
|
||||
|
@ -26,8 +26,10 @@ func (w *Workflow) runWorkflowStep(template *WorkflowTemplate, input string, res
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
firstMatched = matched
|
||||
results.CAS(false, matched)
|
||||
if matched {
|
||||
firstMatched = matched
|
||||
results.CAS(false, matched)
|
||||
}
|
||||
}
|
||||
|
||||
if len(template.Matchers) > 0 {
|
||||
|
|
Loading…
Reference in New Issue