mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 17:46:37 +03:00
same thing as for the last commit, but for error technique this time
This commit is contained in:
parent
84a7e5ffb9
commit
c64eb38a8b
|
@ -289,15 +289,7 @@ def errorUse(expression, expected=None, resumeValue=True, dump=False):
|
||||||
_, _, _, _, _, _, countedExpressionFields, _ = agent.getFields(countedExpression)
|
_, _, _, _, _, _, countedExpressionFields, _ = agent.getFields(countedExpression)
|
||||||
count = __oneShotErrorUse(countedExpression, countedExpressionFields)
|
count = __oneShotErrorUse(countedExpression, countedExpressionFields)
|
||||||
|
|
||||||
if (not count or (count.isdigit() and int(count) == 0)):
|
if isNumPosStrValue(count):
|
||||||
warnMsg = "it was not possible to count the number "
|
|
||||||
warnMsg += "of entries for the used SQL query. "
|
|
||||||
warnMsg += "sqlmap will assume that it returns only "
|
|
||||||
warnMsg += "one entry"
|
|
||||||
logger.warn(warnMsg)
|
|
||||||
|
|
||||||
stopLimit = 1
|
|
||||||
elif isNumPosStrValue(count):
|
|
||||||
if isinstance(stopLimit, int) and stopLimit > 0:
|
if isinstance(stopLimit, int) and stopLimit > 0:
|
||||||
stopLimit = min(int(count), int(stopLimit))
|
stopLimit = min(int(count), int(stopLimit))
|
||||||
else:
|
else:
|
||||||
|
@ -307,6 +299,15 @@ def errorUse(expression, expected=None, resumeValue=True, dump=False):
|
||||||
infoMsg += "%d entries" % stopLimit
|
infoMsg += "%d entries" % stopLimit
|
||||||
logger.info(infoMsg)
|
logger.info(infoMsg)
|
||||||
|
|
||||||
|
else:
|
||||||
|
warnMsg = "it was not possible to count the number "
|
||||||
|
warnMsg += "of entries for the used SQL query. "
|
||||||
|
warnMsg += "sqlmap will assume that it returns only "
|
||||||
|
warnMsg += "one entry"
|
||||||
|
logger.warn(warnMsg)
|
||||||
|
|
||||||
|
stopLimit = 1
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if stopLimit > TURN_OFF_RESUME_INFO_LIMIT:
|
if stopLimit > TURN_OFF_RESUME_INFO_LIMIT:
|
||||||
kb.suppressResumeInfo = True
|
kb.suppressResumeInfo = True
|
||||||
|
|
Loading…
Reference in New Issue
Block a user