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 {
|
for _, t := range availableTemplates {
|
||||||
// workflows will dynamically adjust the totals while running, as
|
// workflows will dynamically adjust the totals while running, as
|
||||||
// it can't be know in advance which requests will be called
|
// it can't be know in advance which requests will be called
|
||||||
if t.Workflow != nil {
|
if len(t.Workflows) > 0 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
totalRequests += int64(t.TotalRequests) * r.inputCount
|
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)
|
gologger.Error().Msgf("Could not parse file '%s': %s\n", match, err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if len(t.Workflows) > 0 {
|
||||||
|
workflowCount++
|
||||||
|
}
|
||||||
sev := strings.ToLower(t.Info["severity"])
|
sev := strings.ToLower(t.Info["severity"])
|
||||||
if !filterBySeverity || hasMatchingSeverity(sev, allSeverities) {
|
if !filterBySeverity || hasMatchingSeverity(sev, allSeverities) {
|
||||||
parsedTemplates = append(parsedTemplates, t)
|
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"]))
|
gologger.Info().Msgf("%s\n", r.templateLogMsg(t.ID, t.Info["name"], t.Info["author"], t.Info["severity"]))
|
||||||
} else {
|
} else {
|
||||||
gologger.Error().Msgf("Excluding template %s due to severity filter (%s not in [%s])", t.ID, sev, severities)
|
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")
|
return errors.Wrap(err, "could not get dns client")
|
||||||
}
|
}
|
||||||
r.httpClient = client
|
r.httpClient = client
|
||||||
|
r.options = options
|
||||||
|
|
||||||
if len(r.Raw) > 0 {
|
if len(r.Raw) > 0 {
|
||||||
r.rawhttpClient = httpclientpool.GetRawHTTP()
|
r.rawhttpClient = httpclientpool.GetRawHTTP()
|
||||||
|
|
Loading…
Reference in New Issue