diff --git a/lib/core/option.py b/lib/core/option.py index d83b05eca..b0005901e 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -1203,7 +1203,11 @@ def __cleanupOptions(): if 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(): """ diff --git a/lib/core/settings.py b/lib/core/settings.py index 409e5d11f..31001c716 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -75,8 +75,8 @@ UNION_STDEV_COEFF = 7 # length of queue for candidates for time delay adjustment TIME_DELAY_CANDIDATES = 3 -# default time delay in seconds -TIME_DEFAULT_DELAY = 5 +# default time delay in seconds (decimal places added to distinguish explicit usage of --time-sec) +TIME_DEFAULT_DELAY = 5.0001 # HTTP timeout in silent mode HTTP_SILENT_TIMEOUT = 3 diff --git a/lib/parse/cmdline.py b/lib/parse/cmdline.py index 9582d75a9..28bb354f9 100644 --- a/lib/parse/cmdline.py +++ b/lib/parse/cmdline.py @@ -214,7 +214,7 @@ def cmdLineParser(): techniques.add_option("--time-sec", dest="timeSec", type="int", default=TIME_DEFAULT_DELAY, help="Seconds to delay the DBMS response " - "(default 5)") + "(default %s)" % int(TIME_DEFAULT_DELAY)) techniques.add_option("--union-cols", dest="uCols", help="Range of columns to test for UNION query SQL injection")