Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b79d4f7

Browse files
committed
cleaner solution for the problem solved with last commit
1 parent f5cff06 commit b79d4f7

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

lib/core/option.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,8 +1203,9 @@ def __cleanupOptions():
12031203
if conf.data:
12041204
conf.data = urldecode(conf.data)
12051205

1206-
if conf.timeSec == TIME_DEFAULT_DELAY:
1207-
conf.timeSec = int(conf.timeSec)
1206+
# to distinguish explicit usafe of --time-sec
1207+
if conf.timeSec is None:
1208+
conf.timeSec = TIME_DEFAULT_DELAY
12081209
kb.adjustTimeDelay = True
12091210
else:
12101211
kb.adjustTimeDelay = False

lib/core/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@
7575
# length of queue for candidates for time delay adjustment
7676
TIME_DELAY_CANDIDATES = 3
7777

78-
# default time delay in seconds (decimal places added to distinguish explicit usage of --time-sec)
79-
TIME_DEFAULT_DELAY = 5.0001
78+
# default time delay in seconds
79+
TIME_DEFAULT_DELAY = 5
8080

8181
# HTTP timeout in silent mode
8282
HTTP_SILENT_TIMEOUT = 3

lib/parse/cmdline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,9 @@ def cmdLineParser():
212212
"(default BEUST)")
213213

214214
techniques.add_option("--time-sec", dest="timeSec",
215-
type="int", default=TIME_DEFAULT_DELAY,
215+
type="int", default=None,
216216
help="Seconds to delay the DBMS response "
217-
"(default %s)" % int(TIME_DEFAULT_DELAY))
217+
"(default %s)" % TIME_DEFAULT_DELAY)
218218

219219
techniques.add_option("--union-cols", dest="uCols",
220220
help="Range of columns to test for UNION query SQL injection")

0 commit comments

Comments
 (0)