mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-17 18:15:28 +00:00
Misc changes as per review
This commit is contained in:
parent
5393cc4cd5
commit
bdb415b0c7
@ -68,7 +68,7 @@ on extensive configurability, massive extensibility and ease of use.`)
|
||||
flagSet.StringSliceVarP(&options.ExcludedTemplates, "exclude-templates", "et", []string{}, "template or template directory paths to exclude"),
|
||||
flagSet.VarP(&options.Severities, "severity", "s", fmt.Sprintf("Templates to run based on severity. Possible values: %s", severity.GetSupportedSeverities().String())),
|
||||
flagSet.VarP(&options.ExcludeSeverities, "exclude-severity", "es", fmt.Sprintf("Templates to exclude based on severity. Possible values: %s", severity.GetSupportedSeverities().String())),
|
||||
flagSet.NormalizedStringSliceVarP(&options.Author, "author", "a", []string{}, "execute templates that are (co-)created by the specified authors"),
|
||||
flagSet.NormalizedStringSliceVarP(&options.Authors, "author", "a", []string{}, "execute templates that are (co-)created by the specified authors"),
|
||||
)
|
||||
|
||||
createGroup(flagSet, "output", "Output",
|
||||
|
||||
@ -54,7 +54,7 @@ func NewConfig(options *types.Options, catalog *catalog.Catalog, executerOpts pr
|
||||
Tags: options.Tags,
|
||||
ExcludeTags: options.ExcludeTags,
|
||||
IncludeTemplates: options.IncludeTemplates,
|
||||
Authors: options.Author,
|
||||
Authors: options.Authors,
|
||||
Severities: options.Severities,
|
||||
ExcludeSeverities: options.ExcludeSeverities,
|
||||
IncludeTags: options.IncludeTags,
|
||||
|
||||
@ -5,7 +5,7 @@ import (
|
||||
"github.com/projectdiscovery/nuclei/v2/pkg/types"
|
||||
)
|
||||
|
||||
// Engine is an engine for running Nuclei Templates/Workflows.
|
||||
// Engine is an executer for running Nuclei Templates/Workflows.
|
||||
//
|
||||
// The engine contains multiple thread pools which allow using different
|
||||
// concurrency values per protocol executed.
|
||||
@ -19,14 +19,16 @@ type Engine struct {
|
||||
executerOpts protocols.ExecuterOptions
|
||||
}
|
||||
|
||||
// InputProvider is an input provider interface for the nuclei execution
|
||||
// InputProvider is an input providing interface for the nuclei execution
|
||||
// engine.
|
||||
//
|
||||
// An example InputProvider is provided in form of hmap input provider.
|
||||
// An example InputProvider implementation is provided in form of hybrid
|
||||
// input provider in pkg/core/inputs/hybrid/hmap.go
|
||||
type InputProvider interface {
|
||||
// Count returns the number of items for input provider
|
||||
Count() int64
|
||||
// Scan calls a callback function till the input provider is exhausted
|
||||
// Scan iterates the input and for each found item calls the callback
|
||||
// until the input provider has been exhausted.
|
||||
Scan(callback func(value string))
|
||||
}
|
||||
|
||||
|
||||
@ -18,7 +18,7 @@ func NewLoader(options *protocols.ExecuterOptions) (model.WorkflowLoader, error)
|
||||
tagFilter := filter.New(&filter.Config{
|
||||
Tags: options.Options.Tags,
|
||||
ExcludeTags: options.Options.ExcludeTags,
|
||||
Authors: options.Options.Author,
|
||||
Authors: options.Options.Authors,
|
||||
Severities: options.Options.Severities,
|
||||
IncludeTags: options.Options.IncludeTags,
|
||||
})
|
||||
|
||||
@ -29,8 +29,8 @@ type Options struct {
|
||||
Severities severity.Severities
|
||||
// ExcludeSeverities specifies severities to exclude
|
||||
ExcludeSeverities severity.Severities
|
||||
// Author filters templates based on their author and only run the matching ones.
|
||||
Author goflags.NormalizedStringSlice
|
||||
// Authors filters templates based on their author and only run the matching ones.
|
||||
Authors goflags.NormalizedStringSlice
|
||||
// IncludeTags includes specified tags to be run even while being in denylist
|
||||
IncludeTags goflags.NormalizedStringSlice
|
||||
// IncludeTemplates includes specified templates to be run even while being in denylist
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user