MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / adjustTimeDelay

Function adjustTimeDelay

lib/core/common.py:2833–2848  ·  view source on GitHub ↗

Provides tip for adjusting time delay in time-based data retrieval

(lastQueryDuration, lowerStdLimit)

Source from the content-addressed store, hash-verified

2831 return delta >= 0
2832
2833def adjustTimeDelay(lastQueryDuration, lowerStdLimit):
2834 """
2835 Provides tip for adjusting time delay in time-based data retrieval
2836 """
2837
2838 candidate = (1 if not isHeavyQueryBased() else 2) + int(round(lowerStdLimit))
2839
2840 kb.delayCandidates = [candidate] + kb.delayCandidates[:-1]
2841
2842 if all((_ == candidate for _ in kb.delayCandidates)) and candidate < conf.timeSec:
2843 if lastQueryDuration / (1.0 * conf.timeSec / candidate) > MIN_VALID_DELAYED_RESPONSE: # Note: to prevent problems with fast responses for heavy-queries like RANDOMBLOB
2844 conf.timeSec = candidate
2845
2846 infoMsg = "adjusting time delay to "
2847 infoMsg += "%d second%s due to good response times" % (conf.timeSec, 's' if conf.timeSec > 1 else '')
2848 logger.info(infoMsg)
2849
2850def getLastRequestHTTPError():
2851 """

Callers 1

wasLastResponseDelayedFunction · 0.85

Calls 3

roundFunction · 0.90
isHeavyQueryBasedFunction · 0.85
infoMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…