mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-09 22:21:30 +00:00
step by step getting there to partial output presentation to restful API (issue #297), not quite yet though..
This commit is contained in:
@@ -89,7 +89,12 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
|
||||
try:
|
||||
# Set kb.partRun in case "common prediction" feature (a.k.a. "good
|
||||
# samaritan") is used or the engine is called from the API
|
||||
kb.partRun = getPartRun() if conf.predictOutput or hasattr(conf, "api") else None
|
||||
if conf.predictOutput:
|
||||
kb.partRun = getPartRun()
|
||||
elif hasattr(conf, "api"):
|
||||
kb.partRun = getPartRun(alias=False)
|
||||
else:
|
||||
kb.partRun = None
|
||||
|
||||
if partialValue:
|
||||
firstChar = len(partialValue)
|
||||
|
||||
@@ -245,7 +245,7 @@ def errorUse(expression, dump=False):
|
||||
_, _, _, _, _, expressionFieldsList, expressionFields, _ = agent.getFields(expression)
|
||||
|
||||
# Set kb.partRun in case the engine is called from the API
|
||||
kb.partRun = getPartRun() if hasattr(conf, "api") else None
|
||||
kb.partRun = getPartRun(alias=False) if hasattr(conf, "api") else None
|
||||
|
||||
# We have to check if the SQL query might return multiple entries
|
||||
# and in such case forge the SQL limiting the query output one
|
||||
|
||||
@@ -165,7 +165,7 @@ def unionUse(expression, unpack=True, dump=False):
|
||||
_, _, _, _, _, expressionFieldsList, expressionFields, _ = agent.getFields(origExpr)
|
||||
|
||||
# Set kb.partRun in case the engine is called from the API
|
||||
kb.partRun = getPartRun() if hasattr(conf, "api") else None
|
||||
kb.partRun = getPartRun(alias=False) if hasattr(conf, "api") else None
|
||||
|
||||
if expressionFieldsList and len(expressionFieldsList) > 1 and "ORDER BY" in expression.upper():
|
||||
# Removed ORDER BY clause because UNION does not play well with it
|
||||
|
||||
Reference in New Issue
Block a user