From 8cf1471e256b09e8e70ebc460be0b9cf3324e5bd Mon Sep 17 00:00:00 2001 From: Ice3man543 Date: Fri, 5 Mar 2021 11:40:28 +0530 Subject: [PATCH] Fixed a bug with workflows --- v2/cmd/nuclei/main.go | 2 +- v2/internal/runner/processor.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/v2/cmd/nuclei/main.go b/v2/cmd/nuclei/main.go index c76e722d8..fb90aec1e 100644 --- a/v2/cmd/nuclei/main.go +++ b/v2/cmd/nuclei/main.go @@ -84,7 +84,7 @@ based on templates offering massive extensibility and ease of use.`) set.BoolVarP(&options.Workflows, "workflows", "w", false, "Only run workflow templates with nuclei") set.IntVarP(&options.StatsInterval, "stats-interval", "si", 5, "Number of seconds between each stats line") set.BoolVar(&options.SystemResolvers, "system-resolvers", false, "Use system dns resolving as error fallback") - set.IntVar(&options.PageTimeout, "page-timeout", 15, "Seconds to wait for each page in headless") + set.IntVar(&options.PageTimeout, "page-timeout", 20, "Seconds to wait for each page in headless") _ = set.Parse() if cfgFile != "" { diff --git a/v2/internal/runner/processor.go b/v2/internal/runner/processor.go index 2447f2079..5e5f55718 100644 --- a/v2/internal/runner/processor.go +++ b/v2/internal/runner/processor.go @@ -9,6 +9,9 @@ import ( // processTemplateWithList process a template on the URL list func (r *Runner) processTemplateWithList(template *templates.Template) bool { + if r.options.Workflows { + return false + } results := &atomic.Bool{} wg := sizedwaitgroup.New(r.options.BulkSize) r.hostMap.Scan(func(k, _ []byte) error { @@ -32,9 +35,6 @@ func (r *Runner) processTemplateWithList(template *templates.Template) bool { // processTemplateWithList process a template on the URL list func (r *Runner) processWorkflowWithList(template *templates.Template) bool { - if !r.options.Workflows { - return false - } results := &atomic.Bool{} wg := sizedwaitgroup.New(r.options.BulkSize)