Added -w/workflows to only run workflow based templates

This commit is contained in:
Ice3man543 2021-02-22 12:55:57 +05:30
parent 5c50a5c079
commit 1a3fea64f2
3 changed files with 7 additions and 4 deletions

View File

@ -85,6 +85,7 @@ based on templates offering massive extensibility and ease of use.`)
set.StringVarP(&options.ResolversFile, "resolvers", "r", "", "File containing resolver list for nuclei")
set.BoolVar(&options.Headless, "headless", false, "Enable headless browser based templates support")
set.BoolVar(&options.ShowBrowser, "show-browser", false, "Show the browser on the screen")
set.BoolVarP(&options.Workflows, "w", "workflows", false, "Only run workflow templates with nuclei")
_ = set.Parse()
if cfgFile != "" {

View File

@ -304,7 +304,7 @@ func (r *Runner) RunEnumeration() {
if len(template.Workflows) > 0 {
results.CAS(false, r.processWorkflowWithList(template))
} else {
} else if !r.options.Workflows {
results.CAS(false, r.processTemplateWithList(template))
}
}(t)
@ -325,6 +325,5 @@ func (r *Runner) RunEnumeration() {
if r.browser != nil {
r.browser.Close()
// kill chrome process here
}
}

View File

@ -95,7 +95,10 @@ type Options struct {
// ResolversFile is a file containing resolvers for nuclei.
ResolversFile string
// Headless specifies whether to allow headless mode templates
Headless bool
ShowBrowser bool // show the browser too
Headless bool
// ShowBrowser specifies whether the show the browser in headless mode
ShowBrowser bool
// Workflows specifies if only to execute workflows (no normal templates will be run)
Workflows bool
InternalResolversList []string // normalized from resolvers flag as well as file provided.
}