mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-10 09:49:06 +00:00
more advanced time technique(s)
This commit is contained in:
@@ -1276,12 +1276,17 @@ def readXmlFile(xmlFile):
|
||||
xfile.close()
|
||||
return retVal
|
||||
|
||||
def calculateDeltaSeconds(start, epsilon=0.1):
|
||||
def average(values):
|
||||
"""
|
||||
Returns elapsed time from start till now (including expected
|
||||
error set by epsilon parameter)
|
||||
Computes the arithmetic mean of a list of numbers.
|
||||
"""
|
||||
return time.time() - start - kb.responseTime + epsilon
|
||||
return sum(values, 0.0) / len(values)
|
||||
|
||||
def calculateDeltaSeconds(start):
|
||||
"""
|
||||
Returns elapsed time from start till now
|
||||
"""
|
||||
return time.time() - start
|
||||
|
||||
def initCommonOutputs():
|
||||
kb.commonOutputs = {}
|
||||
|
||||
@@ -1173,7 +1173,7 @@ def __setKnowledgeBaseAttributes():
|
||||
kb.proxyAuthHeader = None
|
||||
kb.queryCounter = 0
|
||||
kb.redirectSetCookie = None
|
||||
kb.responseTime = 0
|
||||
kb.responseTimes = []
|
||||
kb.resumedQueries = {}
|
||||
kb.retriesCount = 0
|
||||
kb.tamperFunctions = []
|
||||
|
||||
@@ -48,8 +48,9 @@ DUMP_STOP_MARKER = "__STOP__"
|
||||
|
||||
PAYLOAD_DELIMITER = "\x00"
|
||||
|
||||
# minimum difference of loading time in seconds for delayed time payloads
|
||||
TIME_MIN_DELTA = 2
|
||||
# time testing settings
|
||||
TIME_TOLERANCE = 0.5
|
||||
MIN_DURATION_RATIO = 1.5
|
||||
|
||||
# System variables
|
||||
IS_WIN = subprocess.mswindows
|
||||
|
||||
Reference in New Issue
Block a user