diff --git a/v2/cmd/nuclei/main.go b/v2/cmd/nuclei/main.go index 13602bfcd..08cc082a3 100644 --- a/v2/cmd/nuclei/main.go +++ b/v2/cmd/nuclei/main.go @@ -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", diff --git a/v2/pkg/catalog/loader/loader.go b/v2/pkg/catalog/loader/loader.go index 386898b12..9915cf49e 100644 --- a/v2/pkg/catalog/loader/loader.go +++ b/v2/pkg/catalog/loader/loader.go @@ -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, diff --git a/v2/pkg/core/engine.go b/v2/pkg/core/engine.go index 455546244..5d7cf9461 100644 --- a/v2/pkg/core/engine.go +++ b/v2/pkg/core/engine.go @@ -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)) } diff --git a/v2/pkg/parsers/workflow_loader.go b/v2/pkg/parsers/workflow_loader.go index e3f9ab8b2..e0efd3fed 100644 --- a/v2/pkg/parsers/workflow_loader.go +++ b/v2/pkg/parsers/workflow_loader.go @@ -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, }) diff --git a/v2/pkg/types/types.go b/v2/pkg/types/types.go index 7f5a1851b..f618484eb 100644 --- a/v2/pkg/types/types.go +++ b/v2/pkg/types/types.go @@ -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