Fixed two logic bugs

dev
Ice3man543 2020-04-04 17:36:20 +05:30
parent b1cd18b99d
commit 80561fef23
1 changed files with 3 additions and 1 deletions

View File

@ -66,6 +66,7 @@ func (r *Runner) RunEnumeration() {
// If the template path is a single template and not a glob, use that. // If the template path is a single template and not a glob, use that.
if !strings.Contains(r.options.Templates, "*") { if !strings.Contains(r.options.Templates, "*") {
r.processTemplate(r.options.Templates) r.processTemplate(r.options.Templates)
return
} }
// Handle the glob, evaluate it and run all the template file checks // Handle the glob, evaluate it and run all the template file checks
@ -144,6 +145,7 @@ func (r *Runner) sendRequest(template *templates.Template, URL string) {
} }
// Send the request to the target servers // Send the request to the target servers
reqLoop:
for _, req := range compiledRequest { for _, req := range compiledRequest {
resp, err := r.client.Do(req) resp, err := r.client.Do(req)
if err != nil { if err != nil {
@ -177,7 +179,7 @@ func (r *Runner) sendRequest(template *templates.Template, URL string) {
// Check if the matcher matched // Check if the matcher matched
if !matcher.Match(resp, body, headers) { if !matcher.Match(resp, body, headers) {
continue continue reqLoop
} }
} }