mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 11:03:47 +03:00
Patch for an Issue #421
This commit is contained in:
parent
596cf95040
commit
f0a419bdec
|
@ -899,6 +899,7 @@ class Agent(object):
|
|||
def forgeQueryOutputLength(self, expression):
|
||||
lengthQuery = queries[Backend.getIdentifiedDbms()].length.query
|
||||
select = re.search("\ASELECT\s+", expression, re.I)
|
||||
selectTopNotIntExpr = re.search("\ASELECT\s+TOP\s+[\d]+\s+(.+?)\s+FROM.+NOT IN", expression, re.I)
|
||||
selectTopExpr = re.search("\ASELECT\s+TOP\s+[\d]+\s+(.+?)\s+FROM", expression, re.I)
|
||||
selectFromExpr = re.search("\ASELECT\s+(.+?)\s+FROM", expression, re.I)
|
||||
selectExpr = re.search("\ASELECT\s+(.+)$", expression, re.I)
|
||||
|
@ -910,7 +911,9 @@ class Agent(object):
|
|||
else:
|
||||
query = expression
|
||||
|
||||
if select:
|
||||
if selectTopNotIntExpr:
|
||||
lengthExpr = lengthQuery % ("(%s)" % expression)
|
||||
elif select:
|
||||
lengthExpr = expression.replace(query, lengthQuery % query, 1)
|
||||
else:
|
||||
lengthExpr = lengthQuery % expression
|
||||
|
|
Loading…
Reference in New Issue
Block a user