mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 13:11:29 +00:00
Merge branch 'master' of github.com:sqlmapproject/sqlmap
This commit is contained in:
@@ -680,10 +680,15 @@ class Agent(object):
|
||||
stopLimit = None
|
||||
limitCond = True
|
||||
|
||||
limitRegExp = re.search(queries[Backend.getIdentifiedDbms()].limitregexp.query, expression, re.I)
|
||||
limitRegExp2 = re.search(queries[Backend.getIdentifiedDbms()].limitregexp.query2, expression, re.I)
|
||||
topLimit = re.search("TOP\s+([\d]+)\s+", expression, re.I)
|
||||
|
||||
limitRegExp = re.search(queries[Backend.getIdentifiedDbms()].limitregexp.query, expression, re.I)
|
||||
|
||||
if hasattr(queries[Backend.getIdentifiedDbms()].limitregexp, "query2"):
|
||||
limitRegExp2 = re.search(queries[Backend.getIdentifiedDbms()].limitregexp.query2, expression, re.I)
|
||||
else:
|
||||
limitRegExp2 = None
|
||||
|
||||
if (limitRegExp or limitRegExp2) or (Backend.getIdentifiedDbms() in (DBMS.MSSQL, DBMS.SYBASE) and topLimit):
|
||||
if Backend.getIdentifiedDbms() in (DBMS.MYSQL, DBMS.PGSQL, DBMS.SQLITE):
|
||||
limitGroupStart = queries[Backend.getIdentifiedDbms()].limitgroupstart.query
|
||||
@@ -727,7 +732,10 @@ class Agent(object):
|
||||
# (or equivalent, depending on the back-end DBMS) word
|
||||
if Backend.getIdentifiedDbms() in (DBMS.MYSQL, DBMS.PGSQL, DBMS.SQLITE):
|
||||
stopLimit += startLimit
|
||||
_ = expression.index(queries[Backend.getIdentifiedDbms()].limitstring.query)
|
||||
if expression.find(queries[Backend.getIdentifiedDbms()].limitstring.query) > 0:
|
||||
_ = expression.index(queries[Backend.getIdentifiedDbms()].limitstring.query)
|
||||
else:
|
||||
_ = expression.index("LIMIT ")
|
||||
expression = expression[:_]
|
||||
|
||||
elif Backend.getIdentifiedDbms() in (DBMS.MSSQL, DBMS.SYBASE):
|
||||
|
||||
@@ -191,6 +191,7 @@ def initCase(switches=None):
|
||||
|
||||
logger.debug("using output directory '%s' for this test case" % paths.SQLMAP_OUTPUT_PATH)
|
||||
|
||||
LOGGER_HANDLER.stream = sys.stdout = StringIO.StringIO()
|
||||
cmdLineOptions = cmdLineParser()
|
||||
cmdLineOptions.liveTest = cmdLineOptions.smokeTest = False
|
||||
|
||||
@@ -209,11 +210,11 @@ def runCase(switches=None, parse=None):
|
||||
|
||||
initCase(switches)
|
||||
|
||||
LOGGER_HANDLER.stream = sys.stdout = StringIO.StringIO()
|
||||
retVal = True
|
||||
exception = None
|
||||
result = False
|
||||
console = ""
|
||||
LOGGER_HANDLER.stream = sys.stdout = StringIO.StringIO()
|
||||
|
||||
try:
|
||||
result = start()
|
||||
|
||||
Reference in New Issue
Block a user