sqlmapproject/sqlmap · error · SqlmapMissingMandatoryOptionException
missing a mandatory option in the configuration file…
Error message
missing a mandatory option in the configuration file (direct, url, logFile, bulkFile, googleDork, requestFile, openApiFile or wizard)
What it means
SqlmapMissingMandatoryOptionException: neither the config file nor the command line provided any target option (direct, url, logFile, bulkFile, googleDork, requestFile, openApiFile or wizard), so sqlmap has nothing to attack.
Solutions
- Provide a target, e.g. -u URL, -d DSN, -g dork, -m bulkfile, -r requestfile
- Set one of the Target options in the config file
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at lib/parse/configfile.py:95 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of sqlmapproject/sqlmap@0a35b20e39 (2026-08-26).
Data as JSON: /api/errors/dc977823dc086071.
Report an issue: GitHub.
Appendix: source
Thrown at lib/parse/configfile.py:95
raise SqlmapSyntaxException(errMsg)
finally:
configFP.close()
if not config.has_section("Target"):
errMsg = "missing a mandatory section 'Target' in the configuration file"
raise SqlmapMissingMandatoryOptionException(errMsg)
mandatory = False
for option in ("direct", "url", "logFile", "bulkFile", "googleDork", "requestFile", "openApiFile", "wizard"):
if config.has_option("Target", option) and config.get("Target", option) or cmdLineOptions.get(option):
mandatory = True
break
if not mandatory:
errMsg = "missing a mandatory option in the configuration file "
errMsg += "(direct, url, logFile, bulkFile, googleDork, requestFile, openApiFile or wizard)"
raise SqlmapMissingMandatoryOptionException(errMsg)
for family, optionData in optDict.items():
for option, datatype in optionData.items():
datatype = unArrayizeValue(datatype)
configFileProxy(family, option, datatype)
View on GitHub (pinned to 0a35b20e39)