major fix for MySQL error based injections

This commit is contained in:
Miroslav Stampar 2010-10-19 15:17:16 +00:00
parent 1fce9683f8
commit d7622bb9cf

View File

@ -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