mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 17:46:37 +03:00
added response time kb attribute
This commit is contained in:
parent
73dfb69308
commit
612ee08a0b
|
@ -734,7 +734,9 @@ def checkConnection(suppressOutput=False):
|
||||||
logger.info(infoMsg)
|
logger.info(infoMsg)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
start = time.time()
|
||||||
page, _ = Request.queryPage(content=True)
|
page, _ = Request.queryPage(content=True)
|
||||||
|
kb.responseTime = time.time() - start
|
||||||
conf.seqMatcher.set_seq1(page)
|
conf.seqMatcher.set_seq1(page)
|
||||||
except sqlmapConnectionException, errMsg:
|
except sqlmapConnectionException, errMsg:
|
||||||
errMsg = getUnicode(errMsg)
|
errMsg = getUnicode(errMsg)
|
||||||
|
|
|
@ -265,7 +265,7 @@ def start():
|
||||||
|
|
||||||
setupTargetEnv()
|
setupTargetEnv()
|
||||||
|
|
||||||
if not checkConnection(conf.forms) or not checkString() or not checkRegexp():
|
if not checkConnection(suppressOutput=conf.forms) or not checkString() or not checkRegexp():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if conf.nullConnection:
|
if conf.nullConnection:
|
||||||
|
|
|
@ -1290,12 +1290,12 @@ def readXmlFile(xmlFile):
|
||||||
xfile.close()
|
xfile.close()
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
def calculateDeltaSeconds(start, epsilon=0.05):
|
def calculateDeltaSeconds(start, epsilon=0.1):
|
||||||
"""
|
"""
|
||||||
Returns elapsed time from start till now (including expected
|
Returns elapsed time from start till now (including expected
|
||||||
error set by epsilon parameter)
|
error set by epsilon parameter)
|
||||||
"""
|
"""
|
||||||
return int(time.time() - start + epsilon)
|
return int(time.time() - start - kb.responseTime + epsilon)
|
||||||
|
|
||||||
def initCommonOutputs():
|
def initCommonOutputs():
|
||||||
kb.commonOutputs = {}
|
kb.commonOutputs = {}
|
||||||
|
|
|
@ -1170,6 +1170,7 @@ def __setKnowledgeBaseAttributes():
|
||||||
kb.partRun = None
|
kb.partRun = None
|
||||||
kb.proxyAuthHeader = None
|
kb.proxyAuthHeader = None
|
||||||
kb.queryCounter = 0
|
kb.queryCounter = 0
|
||||||
|
kb.responseTime = 0
|
||||||
kb.resumedQueries = {}
|
kb.resumedQueries = {}
|
||||||
kb.retriesCount = 0
|
kb.retriesCount = 0
|
||||||
kb.tamperFunctions = []
|
kb.tamperFunctions = []
|
||||||
|
|
Loading…
Reference in New Issue
Block a user