mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 11:03:47 +03:00
automatically increasing default --time-sec value when --tor/--proxy used (not touching anything if explicit --time-sec set)
This commit is contained in:
parent
b79d4f70f3
commit
4d48ac54dc
|
@ -1203,8 +1203,17 @@ def __cleanupOptions():
|
|||
if conf.data:
|
||||
conf.data = urldecode(conf.data)
|
||||
|
||||
# to distinguish explicit usafe of --time-sec
|
||||
# to distinguish explicit usage of --time-sec
|
||||
if conf.timeSec is None:
|
||||
if conf.tor or conf.proxy:
|
||||
conf.timeSec = 2 * TIME_DEFAULT_DELAY
|
||||
kb.adjustTimeDelay = False
|
||||
|
||||
warnMsg = "increasing default value for "
|
||||
warnMsg += " --time-sec to %d because " % conf.timeSec
|
||||
warnMsg += "%s switch used" % ("--tor" if conf.tor else "--proxy")
|
||||
logger.warn(warnMsg)
|
||||
else:
|
||||
conf.timeSec = TIME_DEFAULT_DELAY
|
||||
kb.adjustTimeDelay = True
|
||||
else:
|
||||
|
@ -1543,6 +1552,10 @@ def __basicOptionValidation():
|
|||
errMsg = "switch --forms requires usage of -u (--url) switch"
|
||||
raise sqlmapSyntaxException, errMsg
|
||||
|
||||
if conf.tor and conf.ignoreProxy:
|
||||
errMsg = "switch --tor is incompatible with switch --ignore-proxy"
|
||||
raise sqlmapSyntaxException, errMsg
|
||||
|
||||
if conf.proxy and conf.ignoreProxy:
|
||||
errMsg = "switch --proxy is incompatible with switch --ignore-proxy"
|
||||
raise sqlmapSyntaxException, errMsg
|
||||
|
|
Loading…
Reference in New Issue
Block a user