more work on #342

This commit is contained in:
Bernardo Damele 2013-01-15 17:14:44 +00:00
parent ec076f5f8a
commit 2a751e075d
2 changed files with 1 additions and 4 deletions

View File

@ -891,9 +891,6 @@ class Agent(object):
else: else:
query = expression query = expression
if (select and re.search("\A(COUNT|LTRIM)\(", query, re.I)) or len(query) <= 1:
return query
if selectDistinctExpr: if selectDistinctExpr:
lengthExpr = "SELECT %s FROM (%s)" % (lengthQuery % query, expression) lengthExpr = "SELECT %s FROM (%s)" % (lengthQuery % query, expression)

View File

@ -75,7 +75,7 @@ def _goInference(payload, expression, charsetType=None, firstChar=None, lastChar
timeBasedCompare = (kb.technique in (PAYLOAD.TECHNIQUE.TIME, PAYLOAD.TECHNIQUE.STACKED)) timeBasedCompare = (kb.technique in (PAYLOAD.TECHNIQUE.TIME, PAYLOAD.TECHNIQUE.STACKED))
if not (timeBasedCompare and kb.dnsTest): 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) length = queryOutputLength(expression, payload)
else: else:
length = None length = None