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

Skip to content

Commit 37db27b

Browse files
committed
turning back on automatic adjusting of delays in time based queries
1 parent 0205d96 commit 37db27b

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

lib/core/common.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2036,11 +2036,11 @@ def adjustTimeDelay(lastQueryDuration, lowerStdLimit):
20362036
kb.delayCandidates = [candidate] + kb.delayCandidates[:-1]
20372037

20382038
if all([x == candidate for x in kb.delayCandidates]) and candidate < conf.timeSec:
2039-
infoMsg = "due to good response times you can "
2040-
infoMsg += "try to adjust the time-delay to "
2041-
infoMsg += "a more appropriate value (e.g. --time-sec=%d)" % candidate
2042-
singleTimeLogMessage(infoMsg)
2043-
kb.adjustTimeDelay = False
2039+
conf.timeSec = candidate
2040+
2041+
infoMsg = "adjusting time delay to "
2042+
infoMsg += "%d second%s due to good response times" % (conf.timeSec, 's' if conf.timeSec > 1 else '')
2043+
logger.info(infoMsg)
20442044

20452045
def getLastRequestHTTPError():
20462046
"""

lib/techniques/blind/inference.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,15 +274,16 @@ def getChar(idx, charTbl=asciiTbl, continuousOrder=True, expand=charsetType is N
274274
errMsg = "invalid character detected. retrying.."
275275
logger.error(errMsg)
276276

277+
conf.timeSec += 1
278+
277279
warnMsg = "increasing time delay to %d second%s " % (conf.timeSec, 's' if conf.timeSec > 1 else '')
278280
logger.warn(warnMsg)
279281

280-
conf.timeSec += 1
281-
282282
if kb.adjustTimeDelay:
283283
dbgMsg = "turning off auto-adjustment mechanism"
284284
logger.debug(dbgMsg)
285285
kb.adjustTimeDelay = False
286+
286287
return getChar(idx, originalTbl, continuousOrder, expand, shiftTable)
287288
else:
288289
errMsg = "unable to properly validate last character value ('%s').." % decodeIntToUnicode(retVal)

0 commit comments

Comments
 (0)