diff --git a/v2/cmd/nuclei/main.go b/v2/cmd/nuclei/main.go index 490687d45..a863859f7 100644 --- a/v2/cmd/nuclei/main.go +++ b/v2/cmd/nuclei/main.go @@ -135,7 +135,7 @@ on extensive configurability, massive extensibility and ease of use.`) flagSet.BoolVarP(&options.FollowRedirects, "follow-redirects", "fr", false, "enable following redirects for http templates"), flagSet.IntVarP(&options.MaxRedirects, "max-redirects", "mr", 10, "max number of redirects to follow for http templates"), flagSet.StringVarP(&options.ReportingConfig, "report-config", "rc", "", "nuclei reporting module configuration file"), // TODO merge into the config file or rename to issue-tracking - flagSet.StringSliceVarP(&options.CustomHeaders, "header", "H", []string{}, "custom headers in header:value format"), + flagSet.FileStringSliceVarP(&options.CustomHeaders, "header", "H", []string{}, "custom headers in header:value format"), flagSet.RuntimeMapVarP(&options.Vars, "var", "V", []string{}, "custom vars in var=value format"), flagSet.StringVarP(&options.ResolversFile, "resolvers", "r", "", "file containing resolver list for nuclei"), flagSet.BoolVarP(&options.SystemResolvers, "system-resolvers", "sr", false, "use system DNS resolving as error fallback"), diff --git a/v2/go.mod b/v2/go.mod index 066a66d19..0db781e88 100644 --- a/v2/go.mod +++ b/v2/go.mod @@ -30,7 +30,7 @@ require ( github.com/projectdiscovery/fastdialer v0.0.15-0.20220127193345-f06b0fd54d47 github.com/projectdiscovery/filekv v0.0.0-20210915124239-3467ef45dd08 github.com/projectdiscovery/fileutil v0.0.0-20210928100737-cab279c5d4b5 - github.com/projectdiscovery/goflags v0.0.8-0.20220223132346-fcffa47ead36 + github.com/projectdiscovery/goflags v0.0.8-0.20220323170412-1721b7db8fa0 github.com/projectdiscovery/gologger v1.1.4 github.com/projectdiscovery/hmap v0.0.2-0.20210917080408-0fd7bd286bfa github.com/projectdiscovery/interactsh v1.0.1-0.20220131074403-ca8bb8f87cd0 diff --git a/v2/go.sum b/v2/go.sum index f1979a4e3..33fe5c94b 100644 --- a/v2/go.sum +++ b/v2/go.sum @@ -441,6 +441,8 @@ github.com/projectdiscovery/folderutil v0.0.0-20211206150108-b4e7ea80f36e/go.mod github.com/projectdiscovery/goflags v0.0.7/go.mod h1:Jjwsf4eEBPXDSQI2Y+6fd3dBumJv/J1U0nmpM+hy2YY= github.com/projectdiscovery/goflags v0.0.8-0.20220223132346-fcffa47ead36 h1:7tPZ9Ui9Iyo/bfP+LtOOKJRrXO7ZzunzMjqHClTDZEA= github.com/projectdiscovery/goflags v0.0.8-0.20220223132346-fcffa47ead36/go.mod h1:37KhVbVLllyuIAgpXGqcvE/hsFEwJ+ctEUSHawjhsBY= +github.com/projectdiscovery/goflags v0.0.8-0.20220323170412-1721b7db8fa0 h1:mcuj09fJ/cBUuMdVkiAId+rTEwwXPbefEVba6unGy4E= +github.com/projectdiscovery/goflags v0.0.8-0.20220323170412-1721b7db8fa0/go.mod h1:37KhVbVLllyuIAgpXGqcvE/hsFEwJ+ctEUSHawjhsBY= github.com/projectdiscovery/gologger v1.0.1/go.mod h1:Ok+axMqK53bWNwDSU1nTNwITLYMXMdZtRc8/y1c7sWE= github.com/projectdiscovery/gologger v1.1.4 h1:qWxGUq7ukHWT849uGPkagPKF3yBPYAsTtMKunQ8O2VI= github.com/projectdiscovery/gologger v1.1.4/go.mod h1:Bhb6Bdx2PV1nMaFLoXNBmHIU85iROS9y1tBuv7T5pMY= diff --git a/v2/pkg/types/types.go b/v2/pkg/types/types.go index de2eca9c5..ca10b4cd4 100644 --- a/v2/pkg/types/types.go +++ b/v2/pkg/types/types.go @@ -28,7 +28,7 @@ type Options struct { // ExcludedTemplates specifies the template/templates to exclude ExcludedTemplates goflags.FileOriginalNormalizedStringSlice // CustomHeaders is the list of custom global headers to send with each request. - CustomHeaders goflags.StringSlice + CustomHeaders goflags.FileStringSlice // Vars is the list of custom global vars Vars goflags.RuntimeMap // vars to use as iterative payload