Minor update for #5910

This commit is contained in:
Miroslav Stampar
2025-06-16 11:22:29 +02:00
parent b8402744fc
commit d4f479e7a8
3 changed files with 7 additions and 7 deletions

View File

@@ -2546,11 +2546,11 @@ def _checkTor():
try:
page, _, _ = Request.getPage(url="https://check.torproject.org/api/ip", raise404=False)
content = json.loads(page)
except SqlmapConnectionException:
content = None
tor_status = json.loads(page)
except (SqlmapConnectionException, TypeError, ValueError):
tor_status = None
if not content or not content.get("IsTor"):
if not tor_status or not tor_status.get("IsTor"):
errMsg = "it appears that Tor is not properly set. Please try using options '--tor-type' and/or '--tor-port'"
raise SqlmapConnectionException(errMsg)
else: