projectdiscovery/nuclei · error

both verbose and silent mode specified

Error message

both verbose and silent mode specified

What it means

The default arm of the payload type switch in ValidatePayloads: the payload value is neither a string (wordlist file path), a map (loadable payload spec), nor a generic list. YAML scalars such as numbers or booleans, or nested structures of unexpected shape, land here and the template is rejected.

Source

Thrown at internal/runner/options.go:156

	if options.OfflineHTTP {
		options.DisableHTTPProbe = true
	}
}

// validateOptions validates the configuration options passed
func ValidateOptions(options *types.Options) error {
	if err := validateOptions.Struct(options); err != nil {
		if _, ok := err.(*validator.InvalidValidationError); ok {
			return err
		}
		errs := []string{}
		for _, err := range err.(validator.ValidationErrors) {
			errs = append(errs, err.Namespace()+": "+err.Tag())
		}
		return errors.Wrap(errors.New(strings.Join(errs, ", ")), "validation failed for these fields")
	}
	if options.Verbose && options.Silent {
		return errors.New("both verbose and silent mode specified")
	}

	if (options.HeadlessOptionalArguments != nil || options.ShowBrowser || options.UseInstalledChrome) && !options.Headless {
		return errors.New("headless mode (-headless) is required if -ho, -sb, -sc or -lha are set")
	}

	if options.FollowHostRedirects && options.FollowRedirects {
		return errors.New("both follow host redirects and follow redirects specified")
	}
	if options.ShouldFollowHTTPRedirects() && options.DisableRedirects {
		return errors.New("both follow redirects and disable redirects specified")
	}
	// loading the proxy server list from file or cli and test the connectivity
	if err := loadProxyServers(options); err != nil {
		return err
	}
	if options.Validate {
		validateTemplatePaths(options.Logger, config.DefaultConfig.TemplatesDirectory, options.Templates, options.Workflows)

View on GitHub (pinned to 265b3a3dec)

Solutions

  1. Turn the value into a list of strings, e.g. count: ["10"]
  2. Or use a wordlist file path string, or the map form with a files key
  3. Quote values that YAML would otherwise coerce to numbers or booleans
  4. Re-run nuclei -validate to confirm the payload now parses

Example fix

# before
payloads:
  count: 10
# after
payloads:
  count:
    - "10"
Defensive patterns

Strategy: type-guard

Type guard

func isSupportedPayloadValue(v interface{}) bool {
    switch v.(type) {
    case string, map[string]interface{}, []interface{}:
        return true
    default:
        return false
    }
}

Prevention

When it happens

Trigger: payloads: {retries: 10} or {debug: true} - YAML parses these as int/bool rather than list or path string; also nested maps that do not match the expected payload spec shape.

Common situations: Unquoted scalars being type-inferred by YAML; copy-pasting a config value into a payload slot; refactoring payloads into unsupported structures.

Related errors


AI-assisted analysis of projectdiscovery/nuclei@265b3a3dec (2026-08-15). Data as JSON: /api/errors/cd4f537a8f6a0d1f. Report an issue: GitHub.