mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 06:50:14 +00:00
Minor bug fix to make the Partial UNION query SQL injection technique
work properly also on Oracle and Microsoft SQL Server.
This commit is contained in:
parent
1f7810e46a
commit
64bb57d786
5 changed files with 24 additions and 19 deletions
|
|
@ -261,12 +261,19 @@ def unionUse(expression, direct=False, unescape=True, resetCounter=False):
|
|||
return
|
||||
|
||||
for num in xrange(startLimit, stopLimit):
|
||||
orderBy = re.search(" ORDER BY ([\w\_]+)", expression, re.I)
|
||||
if kb.dbms == "Microsoft SQL Server":
|
||||
orderBy = re.search(" ORDER BY ([\w\_]+)", expression, re.I)
|
||||
|
||||
if orderBy:
|
||||
field = orderBy.group(1)
|
||||
else:
|
||||
field = expressionFieldsList[0]
|
||||
|
||||
elif kb.dbms == "Oracle":
|
||||
field = expressionFieldsList
|
||||
|
||||
if orderBy:
|
||||
field = orderBy.group(1)
|
||||
else:
|
||||
field = expressionFieldsList[0]
|
||||
field = None
|
||||
|
||||
limitedExpr = agent.limitQuery(num, expression, field)
|
||||
output = unionUse(limitedExpr, direct=True, unescape=False)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue