Fixed multiple bugs and panics

dev
Ice3man543 2020-12-29 19:46:52 +05:30
parent 1bb4a2568a
commit 4da3d31c72
3 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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)

View File

@ -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()