{"record":{"id":"a57e48d82fdbbb63","repo":"projectdiscovery/subfinder","slug":"both-verbose-and-silent-mode-specified","errorCode":null,"errorMessage":"both verbose and silent mode specified","messagePattern":"both verbose and silent mode specified","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/runner/validate.go","lineNumber":27,"sourceCode":"\t\"github.com/projectdiscovery/gologger\"\n\t\"github.com/projectdiscovery/gologger/formatter\"\n\t\"github.com/projectdiscovery/gologger/levels\"\n\t\"github.com/projectdiscovery/subfinder/v2/pkg/passive\"\n\tmapsutil \"github.com/projectdiscovery/utils/maps\"\n\tsliceutil \"github.com/projectdiscovery/utils/slice\"\n)\n\n// validateOptions validates the configuration options passed\nfunc (options *Options) validateOptions() error {\n\t// Check if domain, list of domains, or stdin info was provided.\n\t// If none was provided, then return.\n\tif len(options.Domain) == 0 && options.DomainsFile == \"\" && !options.Stdin {\n\t\treturn errors.New(\"no input list provided\")\n\t}\n\n\t// Both verbose and silent flags were used\n\tif options.Verbose && options.Silent {\n\t\treturn errors.New(\"both verbose and silent mode specified\")\n\t}\n\n\t// Validate threads and options\n\tif options.Threads == 0 {\n\t\treturn errors.New(\"threads cannot be zero\")\n\t}\n\tif options.Timeout == 0 {\n\t\treturn errors.New(\"timeout cannot be zero\")\n\t}\n\n\t// Always remove wildcard with hostip\n\tif options.HostIP && !options.RemoveWildcard {\n\t\treturn errors.New(\"hostip flag must be used with RemoveWildcard option\")\n\t}\n\n\t// The per-source results limit cannot be negative.\n\tif options.MaxResults < 0 {\n\t\treturn fmt.Errorf(\"max-results cannot be negative\")","sourceCodeStart":9,"sourceCodeEnd":45,"githubUrl":"https://github.com/projectdiscovery/subfinder/blob/7a0b91f0fac01b62c65328bd771a3560ae611d6a/pkg/runner/validate.go#L9-L45","documentation":"Conflicting-flags validation in Options.validateOptions: both -verbose and -silent were set on the command line. These modes are mutually exclusive (verbose increases log output while silent suppresses everything but results), so the options are rejected before enumeration starts.","triggerScenarios":"Thrown at pkg/runner/validate.go:27 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove one of the two flags — use -silent for script/pipe usage or -verbose for debugging, never both","If embedding subfinder as a library, ensure the Options struct does not set both Verbose and Silent to true"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7a0b91f0fac01b62c65328bd771a3560ae611d6a","analyzedAt":"2026-09-06T23:52:02.109Z","contentChangedAt":"2026-09-06T23:52:02.109Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}