mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 08:14:24 +03:00
limiting original UNION query results to only 1 result (potentially speeding things up in some cases)
This commit is contained in:
parent
e00f4a8934
commit
64c241fe92
|
@ -582,7 +582,12 @@ class Agent:
|
|||
if query.startswith("SELECT "):
|
||||
query = query[len("SELECT "):]
|
||||
|
||||
inbandQuery = self.prefixQuery("UNION ALL SELECT ", prefix=prefix)
|
||||
limitOriginal = ""
|
||||
if where == PAYLOAD.WHERE.ORIGINAL:
|
||||
if Backend.getIdentifiedDbms() in (DBMS.MYSQL, ):
|
||||
limitOriginal = "%s " % (queries[Backend.getIdentifiedDbms()].limit.query % (1, 1))
|
||||
|
||||
inbandQuery = self.prefixQuery("%sUNION ALL SELECT " % limitOriginal, prefix=prefix)
|
||||
|
||||
if limited:
|
||||
inbandQuery += ",".join(char if _ != position else '(SELECT %s)' % query for _ in xrange(0, count))
|
||||
|
|
Loading…
Reference in New Issue
Block a user