mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
Minor update (better approach for those old NOT IN cases in MsSQL - instead of standard pivot dump table)
This commit is contained in:
parent
2fc187489b
commit
8b3e17ed4d
|
@ -833,10 +833,10 @@ class Agent(object):
|
|||
if " WHERE " in limitedQuery:
|
||||
limitedQuery = "%s AND %s " % (limitedQuery, self.nullAndCastField(uniqueField or field))
|
||||
else:
|
||||
limitedQuery = "%s WHERE ISNULL(%s,' ') " % (limitedQuery, uniqueField or field)
|
||||
limitedQuery = "%s WHERE %s " % (limitedQuery, self.nullAndCastField(uniqueField or field))
|
||||
|
||||
limitedQuery += "NOT IN (%s" % (limitStr % num)
|
||||
limitedQuery += "%s %s ORDER BY %s) ORDER BY %s" % (self.nullAndCastField(uniqueField or field), fromFrom, uniqueField or "1", uniqueField or "1")
|
||||
limitedQuery += "%s %s ORDER BY %s) ORDER BY %s" % (self.nullAndCastField(uniqueField or field), fromFrom, uniqueField or field, uniqueField or field)
|
||||
else:
|
||||
if " WHERE " in limitedQuery:
|
||||
limitedQuery = "%s AND %s " % (limitedQuery, field)
|
||||
|
|
|
@ -28,6 +28,7 @@ from lib.core.common import isNoneValue
|
|||
from lib.core.common import isNumPosStrValue
|
||||
from lib.core.common import listToStrValue
|
||||
from lib.core.common import parseUnionPage
|
||||
from lib.core.common import prioritySortColumns
|
||||
from lib.core.common import removeReflectiveValues
|
||||
from lib.core.common import singleTimeDebugMessage
|
||||
from lib.core.common import singleTimeWarnMessage
|
||||
|
@ -244,7 +245,7 @@ def unionUse(expression, unpack=True, dump=False):
|
|||
break
|
||||
|
||||
if Backend.getIdentifiedDbms() in (DBMS.MSSQL, DBMS.SYBASE):
|
||||
field = expressionFieldsList[0]
|
||||
field = prioritySortColumns(expressionFieldsList)[0]
|
||||
elif Backend.isDbms(DBMS.ORACLE):
|
||||
field = expressionFieldsList
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue
Block a user