File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111import functools
1212import glob
1313import inspect
14+ import json
1415import logging
1516import os
1617import random
@@ -2544,11 +2545,12 @@ def _checkTor():
25442545 logger .info (infoMsg )
25452546
25462547 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 )
25482550 except SqlmapConnectionException :
2549- page = None
2551+ content = None
25502552
2551- if not page or "Congratulations" not in page :
2553+ if not content or not content . get ( "IsTor" ) :
25522554 errMsg = "it appears that Tor is not properly set. Please try using options '--tor-type' and/or '--tor-port'"
25532555 raise SqlmapConnectionException (errMsg )
25542556 else :
You can’t perform that action at this time.
0 commit comments