sqlmapproject/sqlmap · error · SqlmapConnectionException

it appears that Tor is not properly set. Please try using…

Error message

it appears that Tor is not properly set. Please try using options '--tor-type' and/or '--tor-port'

What it means

Thrown by _checkTor after fetching https://check.torproject.org/api/ip through the configured proxy: either the request failed or the response says IsTor is false, so the --check-tor verification confirms traffic is NOT exiting via Tor. It fires on misconfigured --tor-type/--tor-port, Tor not running, or a blocking network.

Solutions

  1. Set --tor-type (HTTP/SOCKS4/SOCKS5) to match your Tor proxy type
  2. Set --tor-port to the actual Tor port (9050 SOCKS, 8118 HTTP for Privoxy/Bundy)
  3. Ensure the Tor service is running and bootstrapped
  4. Test the proxy manually with curl before rerunning sqlmap
Defensive patterns

Strategy: validation

When it happens

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

Appendix: source

Thrown at lib/core/option.py:2768

        _http_client.HTTPConnection._http_vsn = 10
        _http_client.HTTPConnection._http_vsn_str = 'HTTP/1.0'

def _checkTor():
    if not conf.checkTor:
        return

    infoMsg = "checking Tor connection"
    logger.info(infoMsg)

    try:
        page, _, _ = Request.getPage(url="https://check.torproject.org/api/ip", raise404=False)
        tor_status = json.loads(page)
    except (SqlmapConnectionException, TypeError, ValueError):
        tor_status = None

    if not tor_status or not tor_status.get("IsTor"):
        errMsg = "it appears that Tor is not properly set. Please try using options '--tor-type' and/or '--tor-port'"
        raise SqlmapConnectionException(errMsg)
    else:
        infoMsg = "Tor is properly being used"
        logger.info(infoMsg)

def _basicOptionValidation():
    _nonSqlTechniques = ["--%s" % _ for _ in NONSQL_TECHNIQUES if conf.get(_)]
    if len(_nonSqlTechniques) > 1:
        errMsg = "only one non-SQL technique switch may be used at a time (found: %s). " % ", ".join(_nonSqlTechniques)
        errMsg += "each is a self-contained scan for a different back-end class - pick one"
        raise SqlmapSyntaxException(errMsg)

    if conf.limitStart is not None and not (isinstance(conf.limitStart, int) and conf.limitStart > 0):
        errMsg = "value for option '--start' (limitStart) must be an integer value greater than zero (>0)"
        raise SqlmapSyntaxException(errMsg)

    if conf.limitStop is not None and not (isinstance(conf.limitStop, int) and conf.limitStop > 0):
        errMsg = "value for option '--stop' (limitStop) must be an integer value greater than zero (>0)"
        raise SqlmapSyntaxException(errMsg)

View on GitHub (pinned to 0a35b20e39)