MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / _setTorHttpProxySettings

Function _setTorHttpProxySettings

lib/core/option.py:2487–2507  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2485 _setTorSocksProxySettings()
2486
2487def _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
2509def _setTorSocksProxySettings():
2510 infoMsg = "setting Tor SOCKS proxy settings"

Callers 1

_setTorProxySettingsFunction · 0.85

Calls 3

findLocalPortFunction · 0.90
infoMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…