File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 11
11
import functools
12
12
import glob
13
13
import inspect
14
+ import json
14
15
import logging
15
16
import os
16
17
import random
@@ -2544,11 +2545,12 @@ def _checkTor():
2544
2545
logger .info (infoMsg )
2545
2546
2546
2547
try :
2547
- page , _ , _ = Request .getPage (url = "https://check.torproject.org/" , raise404 = False )
2548
+ page , _ , _ = Request .getPage (url = "https://check.torproject.org/api/ip" , raise404 = False )
2549
+ content = json .loads (page )
2548
2550
except SqlmapConnectionException :
2549
- page = None
2551
+ content = None
2550
2552
2551
- if not page or "Congratulations" not in page :
2553
+ if not content or not content . get ( "IsTor" ) :
2552
2554
errMsg = "it appears that Tor is not properly set. Please try using options '--tor-type' and/or '--tor-port'"
2553
2555
raise SqlmapConnectionException (errMsg )
2554
2556
else :
You can’t perform that action at this time.
0 commit comments