sqlmapproject/sqlmap · error · SqlmapSyntaxException
invalid value used for option '--crawl
Error message
invalid value used for option '--crawl' ('%s') What it means
Startup value-validation guard in _basicOptionValidation: the crawl depth from --crawl (conf.crawlDepth) is validated by calling xrange(conf.crawlDepth); an OverflowError there means the value is not a usable small integer (e.g. absurdly large or non-numeric), and the offending value is embedded in the message via getSafeExString(ex).
Solutions
- Pass a small positive integer to --crawl (e.g. --crawl=3)
- Quote the value correctly so the shell does not pass garbage characters
- Remove --crawl if site crawling is not required
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at lib/core/option.py:2898 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/f3d66663ae9b1b06.
Report an issue: GitHub.
Appendix: source
Thrown at lib/core/option.py:2898
if conf.notString and conf.nullConnection:
errMsg = "option '--not-string' is incompatible with switch '--null-connection'"
raise SqlmapSyntaxException(errMsg)
if conf.tor and conf.osPwn:
errMsg = "option '--tor' is incompatible with switch '--os-pwn'"
raise SqlmapSyntaxException(errMsg)
if conf.noCast and conf.hexConvert:
errMsg = "switch '--no-cast' is incompatible with switch '--hex'"
raise SqlmapSyntaxException(errMsg)
if conf.crawlDepth:
try:
xrange(conf.crawlDepth)
except OverflowError as ex:
errMsg = "invalid value used for option '--crawl' ('%s')" % getSafeExString(ex)
raise SqlmapSyntaxException(errMsg)
if conf.dumpAll and conf.search:
errMsg = "switch '--dump-all' is incompatible with switch '--search'"
raise SqlmapSyntaxException(errMsg)
if conf.string and conf.notString:
errMsg = "option '--string' is incompatible with switch '--not-string'"
raise SqlmapSyntaxException(errMsg)
if conf.regexp and conf.nullConnection:
errMsg = "option '--regexp' is incompatible with switch '--null-connection'"
raise SqlmapSyntaxException(errMsg)
if conf.regexp:
try:
re.compile(conf.regexp)
except Exception as ex:
errMsg = "invalid regular expression '%s' ('%s')" % (conf.regexp, getSafeExString(ex))View on GitHub (pinned to 0a35b20e39)