mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-05-02 23:03:45 +03:00
it seems that SOCKS4 is safer solution for TOR socks access
This commit is contained in:
parent
2adf358524
commit
393843bf87
|
@ -1685,7 +1685,7 @@ def __setTorSocksProxySettings():
|
||||||
infoMsg = "setting Tor SOCKS proxy settings"
|
infoMsg = "setting Tor SOCKS proxy settings"
|
||||||
logger.info(infoMsg)
|
logger.info(infoMsg)
|
||||||
|
|
||||||
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, LOCALHOST, DEFAULT_TOR_SOCKS_PORT)
|
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS4, LOCALHOST, DEFAULT_TOR_SOCKS_PORT)
|
||||||
socks.wrapmodule(urllib2)
|
socks.wrapmodule(urllib2)
|
||||||
|
|
||||||
def __checkTor():
|
def __checkTor():
|
||||||
|
@ -1695,11 +1695,7 @@ def __checkTor():
|
||||||
|
|
||||||
page, _, _ = Request.getPage(url="https://check.torproject.org/", raise404=False)
|
page, _, _ = Request.getPage(url="https://check.torproject.org/", raise404=False)
|
||||||
if not page or 'Congratulations' not in page:
|
if not page or 'Congratulations' not in page:
|
||||||
errMsg = "it seems that Tor is not properly set. "
|
errMsg = "it seems that Tor is not properly set"
|
||||||
errMsg+= "Please make sure that you've configured "
|
|
||||||
errMsg+= "either Polipo (8123/tcp) or Privoxy (8118/tcp) "
|
|
||||||
errMsg+= "to forward the requests to your local SOCKS5 "
|
|
||||||
errMsg+= "instance of Tor client (usually 9050/tcp)"
|
|
||||||
raise sqlmapConnectionException, errMsg
|
raise sqlmapConnectionException, errMsg
|
||||||
else:
|
else:
|
||||||
infoMsg = "Tor is properly being used"
|
infoMsg = "Tor is properly being used"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user