mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-03 13:14:13 +03:00
change in invalid logic regarding --sql-shell (retrieving output for non-query commands did nothing at all)
This commit is contained in:
parent
a6ade08c28
commit
4d923ec375
|
@ -93,7 +93,6 @@ class Enumeration:
|
||||||
kb.data.cachedCounts = {}
|
kb.data.cachedCounts = {}
|
||||||
kb.data.dumpedTable = {}
|
kb.data.dumpedTable = {}
|
||||||
kb.data.processChar = None
|
kb.data.processChar = None
|
||||||
self.alwaysRetrieveSqlOutput = False
|
|
||||||
|
|
||||||
def getBanner(self):
|
def getBanner(self):
|
||||||
if not conf.getBanner:
|
if not conf.getBanner:
|
||||||
|
@ -2353,23 +2352,9 @@ class Enumeration:
|
||||||
for sqlStatement in sqlStatements:
|
for sqlStatement in sqlStatements:
|
||||||
if query.lower().startswith(sqlStatement):
|
if query.lower().startswith(sqlStatement):
|
||||||
sqlType = sqlTitle
|
sqlType = sqlTitle
|
||||||
|
|
||||||
break
|
break
|
||||||
|
|
||||||
if not self.alwaysRetrieveSqlOutput:
|
if not sqlType or 'SELECT' in sqlType:
|
||||||
message = "do you want to retrieve the SQL statement output? "
|
|
||||||
|
|
||||||
if not sqlType or 'SELECT' in sqlType:
|
|
||||||
message += "[Y/n/a] "
|
|
||||||
getOutput = readInput(message, default="Y")
|
|
||||||
else:
|
|
||||||
message += "[y/N/a] "
|
|
||||||
getOutput = readInput(message, default="N")
|
|
||||||
|
|
||||||
if getOutput in ("a", "A"):
|
|
||||||
self.alwaysRetrieveSqlOutput = True
|
|
||||||
|
|
||||||
if not getOutput or getOutput in ("y", "Y") or self.alwaysRetrieveSqlOutput:
|
|
||||||
infoMsg = "fetching %s query output: '%s'" % (sqlType if sqlType is not None else "SQL", query)
|
infoMsg = "fetching %s query output: '%s'" % (sqlType if sqlType is not None else "SQL", query)
|
||||||
logger.info(infoMsg)
|
logger.info(infoMsg)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user