mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-12-01 22:13:53 +03:00
minor bug fix ("trimmed" error message was shown for empty cases too because u'' or None == None)
This commit is contained in:
parent
091c174bc4
commit
fc96764f80
|
@ -85,14 +85,16 @@ def __oneShotErrorUse(expression, field):
|
||||||
|
|
||||||
# Parse the returned page to get the exact error-based
|
# Parse the returned page to get the exact error-based
|
||||||
# sql injection output
|
# sql injection output
|
||||||
output = extractRegexResult(check, page, re.DOTALL | re.IGNORECASE) \
|
output = reduce(lambda x, y: x if x is not None else y, [ \
|
||||||
or extractRegexResult(check, listToStrValue(headers.headers \
|
extractRegexResult(check, page, re.DOTALL | re.IGNORECASE), \
|
||||||
if headers else None), re.DOTALL | re.IGNORECASE) \
|
extractRegexResult(check, listToStrValue(headers.headers \
|
||||||
or extractRegexResult(check, threadData.lastRedirectMsg[1] \
|
if headers else None), re.DOTALL | re.IGNORECASE), \
|
||||||
|
extractRegexResult(check, threadData.lastRedirectMsg[1] \
|
||||||
if threadData.lastRedirectMsg and threadData.lastRedirectMsg[0] == \
|
if threadData.lastRedirectMsg and threadData.lastRedirectMsg[0] == \
|
||||||
threadData.lastRequestUID else None, re.DOTALL | re.IGNORECASE)
|
threadData.lastRequestUID else None, re.DOTALL | re.IGNORECASE)], \
|
||||||
|
None)
|
||||||
|
|
||||||
if output:
|
if output is not None:
|
||||||
output = getUnicode(output, kb.pageEncoding)
|
output = getUnicode(output, kb.pageEncoding)
|
||||||
else:
|
else:
|
||||||
trimmed = extractRegexResult(trimcheck, page, re.DOTALL | re.IGNORECASE) \
|
trimmed = extractRegexResult(trimcheck, page, re.DOTALL | re.IGNORECASE) \
|
||||||
|
|
|
@ -75,11 +75,13 @@ def __oneShotUnionUse(expression, unpack=True):
|
||||||
|
|
||||||
# Parse the returned page to get the exact union-based
|
# Parse the returned page to get the exact union-based
|
||||||
# sql injection output
|
# sql injection output
|
||||||
output = extractRegexResult(check, removeReflectiveValues(page, payload), re.DOTALL | re.IGNORECASE) \
|
output = reduce(lambda x, y: x if x is not None else y, [ \
|
||||||
or extractRegexResult(check, removeReflectiveValues(listToStrValue(headers.headers \
|
extractRegexResult(check, removeReflectiveValues(page, payload), re.DOTALL | re.IGNORECASE), \
|
||||||
if headers else None), payload, True), re.DOTALL | re.IGNORECASE)
|
extractRegexResult(check, removeReflectiveValues(listToStrValue(headers.headers \
|
||||||
|
if headers else None), payload, True), re.DOTALL | re.IGNORECASE)], \
|
||||||
|
None)
|
||||||
|
|
||||||
if output:
|
if output is not None:
|
||||||
output = getUnicode(output, kb.pageEncoding)
|
output = getUnicode(output, kb.pageEncoding)
|
||||||
else:
|
else:
|
||||||
trimmed = extractRegexResult(trimcheck, removeReflectiveValues(page, payload), re.DOTALL | re.IGNORECASE) \
|
trimmed = extractRegexResult(trimcheck, removeReflectiveValues(page, payload), re.DOTALL | re.IGNORECASE) \
|
||||||
|
|
Loading…
Reference in New Issue
Block a user