()
| 2485 | _setTorSocksProxySettings() |
| 2486 | |
| 2487 | def _setTorHttpProxySettings(): |
| 2488 | infoMsg = "setting Tor HTTP proxy settings" |
| 2489 | logger.info(infoMsg) |
| 2490 | |
| 2491 | port = findLocalPort(DEFAULT_TOR_HTTP_PORTS if not conf.torPort else (conf.torPort,)) |
| 2492 | |
| 2493 | if port: |
| 2494 | conf.proxy = "http://%s:%d" % (LOCALHOST, port) |
| 2495 | else: |
| 2496 | errMsg = "can't establish connection with the Tor HTTP proxy. " |
| 2497 | errMsg += "Please make sure that you have Tor (bundle) installed and setup " |
| 2498 | errMsg += "so you could be able to successfully use switch '--tor' " |
| 2499 | raise SqlmapConnectionException(errMsg) |
| 2500 | |
| 2501 | if not conf.checkTor: |
| 2502 | warnMsg = "use switch '--check-tor' at " |
| 2503 | warnMsg += "your own convenience when accessing " |
| 2504 | warnMsg += "Tor anonymizing network because of " |
| 2505 | warnMsg += "known issues with default settings of various 'bundles' " |
| 2506 | warnMsg += "(e.g. Vidalia)" |
| 2507 | logger.warning(warnMsg) |
| 2508 | |
| 2509 | def _setTorSocksProxySettings(): |
| 2510 | infoMsg = "setting Tor SOCKS proxy settings" |
no test coverage detected
searching dependent graphs…