From 2a751e075d626b3f93f8e76aa91e1a0d91d85c03 Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Tue, 15 Jan 2013 17:14:44 +0000 Subject: [PATCH] more work on #342 --- lib/core/agent.py | 3 --- lib/request/inject.py | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/core/agent.py b/lib/core/agent.py index edc6530ab..d7cf5c18a 100644 --- a/lib/core/agent.py +++ b/lib/core/agent.py @@ -891,9 +891,6 @@ class Agent(object): else: query = expression - if (select and re.search("\A(COUNT|LTRIM)\(", query, re.I)) or len(query) <= 1: - return query - if selectDistinctExpr: lengthExpr = "SELECT %s FROM (%s)" % (lengthQuery % query, expression) diff --git a/lib/request/inject.py b/lib/request/inject.py index 6a3087a34..5dab192ee 100644 --- a/lib/request/inject.py +++ b/lib/request/inject.py @@ -75,7 +75,7 @@ def _goInference(payload, expression, charsetType=None, firstChar=None, lastChar timeBasedCompare = (kb.technique in (PAYLOAD.TECHNIQUE.TIME, PAYLOAD.TECHNIQUE.STACKED)) if not (timeBasedCompare and kb.dnsTest): - if (conf.eta or conf.threads > 1) and Backend.getIdentifiedDbms() and not timeBasedCompare: + if (conf.eta or conf.threads > 1) and Backend.getIdentifiedDbms() and not re.search("(COUNT|LTRIM)\(", expression, re.I) and not timeBasedCompare: length = queryOutputLength(expression, payload) else: length = None