@@ -1203,10 +1203,19 @@ def __cleanupOptions():
12031203 if conf .data :
12041204 conf .data = urldecode (conf .data )
12051205
1206- # to distinguish explicit usafe of --time-sec
1206+ # to distinguish explicit usage of --time-sec
12071207 if conf .timeSec is None :
1208- conf .timeSec = TIME_DEFAULT_DELAY
1209- kb .adjustTimeDelay = True
1208+ if conf .tor or conf .proxy :
1209+ conf .timeSec = 2 * TIME_DEFAULT_DELAY
1210+ kb .adjustTimeDelay = False
1211+
1212+ warnMsg = "increasing default value for "
1213+ warnMsg += " --time-sec to %d because " % conf .timeSec
1214+ warnMsg += "%s switch used" % ("--tor" if conf .tor else "--proxy" )
1215+ logger .warn (warnMsg )
1216+ else :
1217+ conf .timeSec = TIME_DEFAULT_DELAY
1218+ kb .adjustTimeDelay = True
12101219 else :
12111220 kb .adjustTimeDelay = False
12121221
@@ -1543,6 +1552,10 @@ def __basicOptionValidation():
15431552 errMsg = "switch --forms requires usage of -u (--url) switch"
15441553 raise sqlmapSyntaxException , errMsg
15451554
1555+ if conf .tor and conf .ignoreProxy :
1556+ errMsg = "switch --tor is incompatible with switch --ignore-proxy"
1557+ raise sqlmapSyntaxException , errMsg
1558+
15461559 if conf .proxy and conf .ignoreProxy :
15471560 errMsg = "switch --proxy is incompatible with switch --ignore-proxy"
15481561 raise sqlmapSyntaxException , errMsg
0 commit comments