Minor patch (avoiding message 'can't establish SSL connection' in --check-tor)

This commit is contained in:
Miroslav Stampar 2015-09-21 11:25:59 +02:00
parent f96edc951c
commit 3fca379f29

View File

@ -2244,7 +2244,11 @@ def _checkTor():
infoMsg = "checking Tor connection" infoMsg = "checking Tor connection"
logger.info(infoMsg) logger.info(infoMsg)
page, _, _ = Request.getPage(url="https://check.torproject.org/", raise404=False) try:
page, _, _ = Request.getPage(url="https://check.torproject.org/", raise404=False)
except SqlmapConnectionException:
page = None
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. Please try using options '--tor-type' and/or '--tor-port'" errMsg = "it seems that Tor is not properly set. Please try using options '--tor-type' and/or '--tor-port'"
raise SqlmapConnectionException(errMsg) raise SqlmapConnectionException(errMsg)