{"record":{"id":"7558b5dc7092b49b","repo":"sqlmapproject/sqlmap","slug":"can-t-establish-connection-with-the-tor-http-proxy","errorCode":null,"errorMessage":"can't establish connection with the Tor HTTP proxy. Please make sure that you have Tor (bundle) installed and setup so you could be able to successfully use switch '--tor' ","messagePattern":"can't establish connection with the Tor HTTP proxy\\. Please make sure that you have Tor \\(bundle\\) installed and setup so you could be able to successfully use switch '--tor' ","errorType":"exception","errorClass":"SqlmapConnectionException","httpStatus":null,"severity":"error","filePath":"lib/core/option.py","lineNumber":2709,"sourceCode":"\n    if conf.torType == PROXY_TYPE.HTTP:\n        _setTorHttpProxySettings()\n    else:\n        _setTorSocksProxySettings()\n\ndef _setTorHttpProxySettings():\n    infoMsg = \"setting Tor HTTP proxy settings\"\n    logger.info(infoMsg)\n\n    port = findLocalPort(DEFAULT_TOR_HTTP_PORTS if not conf.torPort else (conf.torPort,))\n\n    if port:\n        conf.proxy = \"http://%s:%d\" % (LOCALHOST, port)\n    else:\n        errMsg = \"can't establish connection with the Tor HTTP proxy. \"\n        errMsg += \"Please make sure that you have Tor (bundle) installed and setup \"\n        errMsg += \"so you could be able to successfully use switch '--tor' \"\n        raise SqlmapConnectionException(errMsg)\n\n    if not conf.checkTor:\n        warnMsg = \"use switch '--check-tor' at \"\n        warnMsg += \"your own convenience when accessing \"\n        warnMsg += \"Tor anonymizing network because of \"\n        warnMsg += \"known issues with default settings of various 'bundles' \"\n        warnMsg += \"(e.g. Vidalia)\"\n        logger.warning(warnMsg)\n\ndef _setTorSocksProxySettings():\n    infoMsg = \"setting Tor SOCKS proxy settings\"\n    logger.info(infoMsg)\n\n    port = findLocalPort(DEFAULT_TOR_SOCKS_PORTS if not conf.torPort else (conf.torPort,))\n\n    if not port:\n        errMsg = \"can't establish connection with the Tor SOCKS proxy. \"\n        errMsg += \"Please make sure that you have Tor service installed and setup \"","sourceCodeStart":2691,"sourceCodeEnd":2727,"githubUrl":"https://github.com/sqlmapproject/sqlmap/blob/0a35b20e3953d341be6c7ac75ccb0b3362540c8d/lib/core/option.py#L2691-L2727","documentation":"Error \"can't establish connection with the Tor HTTP proxy. Please make sure that you have Tor (bundle) installed and setup so you could be able to successfully use switch '--tor' \" thrown in sqlmapproject/sqlmap.","triggerScenarios":"Thrown at lib/core/option.py:2709 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Install/start the Tor service or Tor Browser bundle so the HTTP proxy port is listening","Use --tor-port to specify a non-default Tor HTTP proxy port","Use --tor-type=SOCKS5 if only the SOCKS port is available","Verify with curl --proxy http://127.0.0.1:<port> that the proxy responds"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0a35b20e3953d341be6c7ac75ccb0b3362540c8d","analyzedAt":"2026-08-26T23:02:52.002Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}