little hack for --time-sec

This commit is contained in:
Miroslav Stampar 2011-04-18 14:46:18 +00:00
parent 6463cad8c5
commit f5cff067c6
3 changed files with 8 additions and 4 deletions

View File

@ -1203,7 +1203,11 @@ def __cleanupOptions():
if conf.data: if conf.data:
conf.data = urldecode(conf.data) conf.data = urldecode(conf.data)
kb.adjustTimeDelay = (conf.timeSec == TIME_DEFAULT_DELAY) if conf.timeSec == TIME_DEFAULT_DELAY:
conf.timeSec = int(conf.timeSec)
kb.adjustTimeDelay = True
else:
kb.adjustTimeDelay = False
def __setConfAttributes(): def __setConfAttributes():
""" """

View File

@ -75,8 +75,8 @@ UNION_STDEV_COEFF = 7
# length of queue for candidates for time delay adjustment # length of queue for candidates for time delay adjustment
TIME_DELAY_CANDIDATES = 3 TIME_DELAY_CANDIDATES = 3
# default time delay in seconds # default time delay in seconds (decimal places added to distinguish explicit usage of --time-sec)
TIME_DEFAULT_DELAY = 5 TIME_DEFAULT_DELAY = 5.0001
# HTTP timeout in silent mode # HTTP timeout in silent mode
HTTP_SILENT_TIMEOUT = 3 HTTP_SILENT_TIMEOUT = 3

View File

@ -214,7 +214,7 @@ def cmdLineParser():
techniques.add_option("--time-sec", dest="timeSec", techniques.add_option("--time-sec", dest="timeSec",
type="int", default=TIME_DEFAULT_DELAY, type="int", default=TIME_DEFAULT_DELAY,
help="Seconds to delay the DBMS response " help="Seconds to delay the DBMS response "
"(default 5)") "(default %s)" % int(TIME_DEFAULT_DELAY))
techniques.add_option("--union-cols", dest="uCols", techniques.add_option("--union-cols", dest="uCols",
help="Range of columns to test for UNION query SQL injection") help="Range of columns to test for UNION query SQL injection")