{"record":{"id":"96d864421547a1da","repo":"owasp-amass/amass","slug":"brute-forcing-cannot-be-performed-without-dns-reso","errorCode":null,"errorMessage":"brute forcing cannot be performed without DNS resolution","messagePattern":"brute forcing cannot be performed without DNS resolution","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"config/config.go","lineNumber":238,"sourceCode":"\t\t\tTTL:        1440,\n\t\t\tConfidence: 50,\n\t\t\tPriority:   5,\n\t\t},\n\t}\n}\n\n// UpdateConfig allows the provided Updater to update the current configuration.\nfunc (c *Config) UpdateConfig(update Updater) error {\n\treturn update.OverrideConfig(c)\n}\n\n// CheckSettings runs some sanity checks on the configuration options selected.\nfunc (c *Config) CheckSettings() error {\n\tvar err error\n\n\tif c.BruteForcing {\n\t\tif c.Passive {\n\t\t\treturn errors.New(\"brute forcing cannot be performed without DNS resolution\")\n\t\t}\n\t}\n\tif c.Passive && c.Active {\n\t\treturn errors.New(\"active enumeration cannot be performed without DNS resolution\")\n\t}\n\n\tc.Wordlist, err = ExpandMaskWordlist(c.Wordlist)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tc.AltWordlist, err = ExpandMaskWordlist(c.AltWordlist)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn err\n}\n","sourceCodeStart":220,"sourceCodeEnd":256,"githubUrl":"https://github.com/owasp-amass/amass/blob/79299dce87b0085db0f2f4ef3e9c52cccb49f514/config/config.go#L220-L256","documentation":"CheckSettings rejects a configuration where brute forcing is enabled while Passive mode is on. Brute forcing requires actively sending DNS queries, which is impossible when the library is restricted to passive/no-DNS-resolution mode, so this combination is treated as a configuration contradiction.","triggerScenarios":"Calling Config.CheckSettings() when c.BruteForcing == true and c.Passive == true, typically after flags like -p (passive) were combined with brute-forcing options or wordlists.","commonSituations":"A developer enables passive mode to stay undetectable but leaves brute forcing (or a wordlist) enabled in the config file, or combines CLI flags such as '--passive' with '--wordlist'.","solutions":["Disable passive mode if brute forcing is required (set Passive: false).","Disable brute forcing / remove wordlist options when running in passive mode.","Update the CLI flag combination before constructing the Config.","Validate flag combinations in the CLI layer with an early error message."],"exampleFix":"// before\ncfg.BruteForcing = true\ncfg.Passive = true\n// after\ncfg.Passive = false // brute forcing requires active DNS resolution","handlingStrategy":"validation","validationCode":"if bruteForcing && passive {\n    return errors.New(\"passive mode cannot be combined with brute forcing\")\n}","typeGuard":null,"tryCatchPattern":"if err := cfg.CheckSettings(); err != nil {\n    if strings.Contains(err.Error(), \"brute forcing cannot be performed\") {\n        // disable brute forcing or turn off passive mode and retry\n    }\n    return err\n}","preventionTips":["Make passive and brute-force flags mutually exclusive in CLI parsing.","Document flag conflicts in help text.","Add a preflight check before constructing Config.","Use an enum mode (passive|active|hybrid) instead of independent booleans."],"tags":["config","dns","validation"],"backgroundTag":"conflicting-config-options","analyzedSha":"79299dce87b0085db0f2f4ef3e9c52cccb49f514","analyzedAt":"2026-09-06T08:22:48.198Z","contentChangedAt":"2026-09-06T08:22:48.198Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}