diff --git a/lib/core/common.py b/lib/core/common.py index 5e2732947..938e8ee0c 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -2036,11 +2036,11 @@ def adjustTimeDelay(lastQueryDuration, lowerStdLimit): kb.delayCandidates = [candidate] + kb.delayCandidates[:-1] if all([x == candidate for x in kb.delayCandidates]) and candidate < conf.timeSec: - infoMsg = "due to good response times you can " - infoMsg += "try to adjust the time-delay to " - infoMsg += "a more appropriate value (e.g. --time-sec=%d)" % candidate - singleTimeLogMessage(infoMsg) - kb.adjustTimeDelay = False + conf.timeSec = candidate + + infoMsg = "adjusting time delay to " + infoMsg += "%d second%s due to good response times" % (conf.timeSec, 's' if conf.timeSec > 1 else '') + logger.info(infoMsg) def getLastRequestHTTPError(): """ diff --git a/lib/techniques/blind/inference.py b/lib/techniques/blind/inference.py index 727f27bfd..d296b4a4a 100644 --- a/lib/techniques/blind/inference.py +++ b/lib/techniques/blind/inference.py @@ -274,15 +274,16 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None errMsg = "invalid character detected. retrying.." logger.error(errMsg) + conf.timeSec += 1 + warnMsg = "increasing time delay to %d second%s " % (conf.timeSec, 's' if conf.timeSec > 1 else '') logger.warn(warnMsg) - conf.timeSec += 1 - if kb.adjustTimeDelay: dbgMsg = "turning off auto-adjustment mechanism" logger.debug(dbgMsg) kb.adjustTimeDelay = False + return getChar(idx, originalTbl, continuousOrder, expand, shiftTable) else: errMsg = "unable to properly validate last character value ('%s').." % decodeIntToUnicode(retVal)