diff --git a/v2/internal/runner/runner.go b/v2/internal/runner/runner.go index dbe9fd48..f11fde03 100644 --- a/v2/internal/runner/runner.go +++ b/v2/internal/runner/runner.go @@ -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 diff --git a/v2/internal/runner/templates.go b/v2/internal/runner/templates.go index 1497c128..c37506a6 100644 --- a/v2/internal/runner/templates.go +++ b/v2/internal/runner/templates.go @@ -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) diff --git a/v2/pkg/protocols/http/http.go b/v2/pkg/protocols/http/http.go index 0d354a06..782e3706 100644 --- a/v2/pkg/protocols/http/http.go +++ b/v2/pkg/protocols/http/http.go @@ -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()