From fa8d378e80a85982a0662e3b2edc658c1dc765f0 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 10 Dec 2010 15:18:15 +0000 Subject: [PATCH] another update --- lib/request/inject.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/request/inject.py b/lib/request/inject.py index d3db530d0..6e868fcd3 100644 --- a/lib/request/inject.py +++ b/lib/request/inject.py @@ -412,7 +412,7 @@ def getValue(expression, blind=True, inband=True, error=True, time=True, fromUse found = False query = query.replace("DISTINCT ", "") - if expected == EXPECTED.BOOL: + if expected == EXPECTED.BOOL and not query.startswith("SELECT "): query = agent.forgeCaseStatement(query) if inband and kb.unionTest is not None: @@ -437,7 +437,10 @@ def getValue(expression, blind=True, inband=True, error=True, time=True, fromUse if blind and kb.booleanTest and not found: kb.technique = PAYLOAD.TECHNIQUE.BOOLEAN if expected == EXPECTED.BOOL: - value = __goBooleanProxy(expression, resumeValue) + booleanExpression = expression + if booleanExpression.startswith("SELECT "): + booleanExpression = booleanExpression[len("SELECT "):] + value = __goBooleanProxy(booleanExpression, resumeValue) else: value = __goInferenceProxy(query, fromUser, expected, batch, resumeValue, unpack, charsetType, firstChar, lastChar) found = value or (value is None and expectingNone)