mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 04:45:27 +00:00
Added -w/workflows to only run workflow based templates
This commit is contained in:
parent
5c50a5c079
commit
1a3fea64f2
@ -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 != "" {
|
||||
|
||||
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@ -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.
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user