This commit is contained in:
Miroslav Stampar 2010-12-09 07:49:18 +00:00
parent db39dc32fc
commit 3fd1c37d53
2 changed files with 10 additions and 3 deletions

View File

@ -36,6 +36,7 @@ from lib.core.enums import HTTPMETHOD
from lib.core.enums import NULLCONNECTION
from lib.core.enums import PLACE
from lib.core.exception import sqlmapConnectionException
from lib.core.settings import MIN_TIME_RESPONSES
from lib.request.basic import decodePage
from lib.request.basic import forgeHeaders
from lib.request.basic import parseResponse
@ -384,6 +385,15 @@ class Connect:
else:
uri = conf.url
if timeBasedCompare:
if len(kb.responseTimes) < MIN_TIME_RESPONSES:
warnMsg = "time-based comparison requested on a statisical model "
warnMsg += "with too small data set. doing few dummy requests."
logger.warn(warnMsg)
while len(kb.responseTimes) < MIN_TIME_RESPONSES:
_ = Connect.queryPage(content=True)
if conf.safUrl and conf.saFreq > 0:
kb.queryCounter += 1
if kb.queryCounter % conf.saFreq == 0:

View File

@ -419,9 +419,6 @@ def getValue(expression, blind=True, inband=True, error=True, time=True, fromUse
elif kb.stackedTest:
kb.technique = PAYLOAD.TECHNIQUE.STACKED
while len(kb.responseTimes) < MIN_TIME_RESPONSES:
_ = Request.queryPage(content=True)
value = __goInferenceProxy(expression, fromUser, expected, batch, resumeValue, unpack, charsetType, firstChar, lastChar)
kb.unionNegative = oldParamNegative