mirror of https://github.com/daffainfo/nuclei.git
Fixed multiple bugs and panics
parent
1bb4a2568a
commit
4da3d31c72
|
@ -226,7 +226,7 @@ func (r *Runner) RunEnumeration() {
|
|||
for _, t := range availableTemplates {
|
||||
// workflows will dynamically adjust the totals while running, as
|
||||
// it can't be know in advance which requests will be called
|
||||
if t.Workflow != nil {
|
||||
if len(t.Workflows) > 0 {
|
||||
continue
|
||||
}
|
||||
totalRequests += int64(t.TotalRequests) * r.inputCount
|
||||
|
|
|
@ -27,13 +27,12 @@ func (r *Runner) getParsedTemplatesFor(templatePaths []string, severities string
|
|||
gologger.Error().Msgf("Could not parse file '%s': %s\n", match, err)
|
||||
continue
|
||||
}
|
||||
if len(t.Workflows) > 0 {
|
||||
workflowCount++
|
||||
}
|
||||
sev := strings.ToLower(t.Info["severity"])
|
||||
if !filterBySeverity || hasMatchingSeverity(sev, allSeverities) {
|
||||
parsedTemplates = append(parsedTemplates, t)
|
||||
// Process the template like a workflow
|
||||
if t.Workflow != nil {
|
||||
workflowCount++
|
||||
}
|
||||
gologger.Info().Msgf("%s\n", r.templateLogMsg(t.ID, t.Info["name"], t.Info["author"], t.Info["severity"]))
|
||||
} else {
|
||||
gologger.Error().Msgf("Excluding template %s due to severity filter (%s not in [%s])", t.ID, sev, severities)
|
||||
|
|
|
@ -80,6 +80,7 @@ func (r *Request) Compile(options *protocols.ExecuterOptions) error {
|
|||
return errors.Wrap(err, "could not get dns client")
|
||||
}
|
||||
r.httpClient = client
|
||||
r.options = options
|
||||
|
||||
if len(r.Raw) > 0 {
|
||||
r.rawhttpClient = httpclientpool.GetRawHTTP()
|
||||
|
|
Loading…
Reference in New Issue