From 9b127e58d2b456e0cfd3ee2db127b4fde9275f18 Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Tue, 26 Oct 2010 09:33:18 +0000 Subject: [PATCH] Adjusted for MySQL weirdness --- lib/techniques/error/use.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/techniques/error/use.py b/lib/techniques/error/use.py index 54b8855ca..108a647e9 100644 --- a/lib/techniques/error/use.py +++ b/lib/techniques/error/use.py @@ -51,7 +51,7 @@ def errorUse(expression): nulledCastedField = agent.nullAndCastField(fieldToCastStr) if kb.dbms == "MySQL": - nulledCastedField = nulledCastedField.replace("AS CHAR)", "AS CHAR(255))") #fix for that 'Subquery returns more than 1 row' + nulledCastedField = nulledCastedField.replace("AS CHAR)", "AS CHAR(100))") # fix for that 'Subquery returns more than 1 row' expressionReplaced = expression.replace(fieldToCastStr, nulledCastedField, 1) expressionUnescaped = unescaper.unescape(expressionReplaced) @@ -69,8 +69,8 @@ def errorUse(expression): payload = agent.payload(newValue=forgedQuery) result = Request.queryPage(urlencode(payload), content=True) - match = re.search('%s(?P.*?)%s' % (ERROR_START_CHAR, ERROR_END_CHAR), result[0], re.DOTALL | re.IGNORECASE) + if match: output = match.group('result') if output: