()
| 2507 | logger.warning(warnMsg) |
| 2508 | |
| 2509 | def _setTorSocksProxySettings(): |
| 2510 | infoMsg = "setting Tor SOCKS proxy settings" |
| 2511 | logger.info(infoMsg) |
| 2512 | |
| 2513 | port = findLocalPort(DEFAULT_TOR_SOCKS_PORTS if not conf.torPort else (conf.torPort,)) |
| 2514 | |
| 2515 | if not port: |
| 2516 | errMsg = "can't establish connection with the Tor SOCKS proxy. " |
| 2517 | errMsg += "Please make sure that you have Tor service installed and setup " |
| 2518 | errMsg += "so you could be able to successfully use switch '--tor' " |
| 2519 | raise SqlmapConnectionException(errMsg) |
| 2520 | |
| 2521 | # SOCKS5 to prevent DNS leaks (http://en.wikipedia.org/wiki/Tor_%28anonymity_network%29) |
| 2522 | socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5 if conf.torType == PROXY_TYPE.SOCKS5 else socks.PROXY_TYPE_SOCKS4, LOCALHOST, port) |
| 2523 | socks.wrapmodule(_http_client) |
| 2524 | |
| 2525 | def _setHttpOptions(): |
| 2526 | if conf.chunked and conf.data: |
no test coverage detected
searching dependent graphs…