sqlmapproject/sqlmap · error · SqlmapSyntaxException
option '--tor' is incompatible with switch '--os-pwn'
Error message
option '--tor' is incompatible with switch '--os-pwn'
What it means
Startup mutual-exclusivity guard in _basicOptionValidation: --tor routes traffic through the Tor SOCKS proxy, while --os-pwn (out-of-band shell via Metasploit) needs a direct reverse connection to the target that cannot run through Tor. Fires when both conf.tor and conf.osPwn are set.
Solutions
- Remove --tor for this run so the OOB payload can connect back directly
- Use a less aggressive technique (e.g. --os-shell without Tor constraints) or drop --os-pwn
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at lib/core/option.py:2887 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/8229a0289b40de6e.
Report an issue: GitHub.
Appendix: source
Thrown at lib/core/option.py:2887
if conf.api and not conf.configFile:
errMsg = "switch '--api' requires usage of option '-c'"
raise SqlmapSyntaxException(errMsg)
if conf.data and conf.nullConnection:
errMsg = "option '--data' is incompatible with switch '--null-connection'"
raise SqlmapSyntaxException(errMsg)
if conf.string and conf.nullConnection:
errMsg = "option '--string' is incompatible with switch '--null-connection'"
raise SqlmapSyntaxException(errMsg)
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'"View on GitHub (pinned to 0a35b20e39)