sqlmapproject/sqlmap · error · SqlmapSyntaxException

switch '--tor' is incompatible with option '--proxy'

Error message

switch '--tor' is incompatible with option '--proxy'

What it means

Startup mutual-exclusivity guard in _basicOptionValidation: --tor implies its own SOCKS/HTTP proxy setup, which would be overridden by an explicit --proxy value; sqlmap rejects the ambiguous combination. Fires when both conf.tor and conf.proxy are set.

Solutions

  1. Remove --proxy and let --tor configure the Tor proxy (optionally with --tor-port/--tor-type)
  2. Remove --tor and point --proxy directly at the Tor SOCKS port (e.g. --proxy=socks5://127.0.0.1:9050)
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at lib/core/option.py:3028 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/373b79e8ffde69d1. Report an issue: GitHub.

Appendix: source

Thrown at lib/core/option.py:3028

    if conf.direct and conf.proxy:
        errMsg = "option '-d' is incompatible with option '--proxy'"
        raise SqlmapSyntaxException(errMsg)

    if conf.direct and conf.tor:
        errMsg = "option '-d' is incompatible with switch '--tor'"
        raise SqlmapSyntaxException(errMsg)

    if not conf.technique:
        errMsg = "option '--technique' can't be empty"
        raise SqlmapSyntaxException(errMsg)

    if conf.tor and conf.ignoreProxy:
        errMsg = "switch '--tor' is incompatible with switch '--ignore-proxy'"
        raise SqlmapSyntaxException(errMsg)

    if conf.tor and conf.proxy:
        errMsg = "switch '--tor' is incompatible with option '--proxy'"
        raise SqlmapSyntaxException(errMsg)

    if conf.proxy and conf.proxyFile:
        errMsg = "switch '--proxy' is incompatible with option '--proxy-file'"
        raise SqlmapSyntaxException(errMsg)

    if conf.proxyFreq and not conf.proxyFile:
        errMsg = "option '--proxy-freq' requires usage of option '--proxy-file'"
        raise SqlmapSyntaxException(errMsg)

    if conf.checkTor and not any((conf.tor, conf.proxy)):
        errMsg = "switch '--check-tor' requires usage of switch '--tor' (or option '--proxy' with HTTP proxy address of Tor service)"
        raise SqlmapSyntaxException(errMsg)

    if conf.torPort is not None and not (isinstance(conf.torPort, int) and conf.torPort >= 0 and conf.torPort <= 65535):
        errMsg = "value for option '--tor-port' must be in range [0, 65535]"
        raise SqlmapSyntaxException(errMsg)

    if conf.torType not in getPublicTypeMembers(PROXY_TYPE, True):

View on GitHub (pinned to 0a35b20e39)