mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 12:41:30 +00:00
major fix for MySQL error based injections
This commit is contained in:
@@ -355,11 +355,16 @@ def __goError(expression, resumeValue=True):
|
|||||||
result = Request.queryPage(urlencode(forgedPayload), content=True)
|
result = Request.queryPage(urlencode(forgedPayload), content=True)
|
||||||
|
|
||||||
match = re.search(temp.errorRegex, result[0], re.DOTALL | re.IGNORECASE)
|
match = re.search(temp.errorRegex, result[0], re.DOTALL | re.IGNORECASE)
|
||||||
|
#import pdb
|
||||||
|
#pdb.set_trace()
|
||||||
if match:
|
if match:
|
||||||
output = match.group('result')
|
output = match.group('result')
|
||||||
if output:
|
if output:
|
||||||
output = output.replace("%c%c%c" % (58, 95, 58), " ").replace("%c%c%c" % (58, 120, 58), "") #':_:' -> EMPTY CHAR, ':x:' -> SPACE CHAR
|
output = output.replace("%c%c%c" % (58, 95, 58), " ").replace("%c%c%c" % (58, 120, 58), "") #':_:' -> EMPTY CHAR, ':x:' -> SPACE CHAR
|
||||||
|
|
||||||
|
if kb.dbms == "MySQL":
|
||||||
|
output = output[:-1]
|
||||||
|
|
||||||
return output
|
return output
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user