mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-03-03 11:45:46 +03:00
minor update (when columns are missing from information_schema too)
This commit is contained in:
parent
cb32d46f2a
commit
fb6a84b10b
|
@ -970,7 +970,7 @@ class Enumeration:
|
|||
|
||||
return kb.data.cachedTables
|
||||
|
||||
def getColumns(self, onlyColNames=False, colTuple=None):
|
||||
def getColumns(self, onlyColNames=False, colTuple=None, bruteForce=None):
|
||||
self.forceDbmsEnum()
|
||||
|
||||
if conf.db is None or conf.db == "CD":
|
||||
|
@ -1030,19 +1030,18 @@ class Enumeration:
|
|||
for tbl in tblList:
|
||||
tblList[tblList.index(tbl)] = safeSQLIdentificatorNaming(tbl, True)
|
||||
|
||||
bruteForce = False
|
||||
if bruteForce is None:
|
||||
if Backend.isDbms(DBMS.MYSQL) and not kb.data.has_information_schema:
|
||||
errMsg = "information_schema not available, "
|
||||
errMsg += "back-end DBMS is MySQL < 5.0"
|
||||
logger.error(errMsg)
|
||||
bruteForce = True
|
||||
|
||||
if Backend.isDbms(DBMS.MYSQL) and not kb.data.has_information_schema:
|
||||
errMsg = "information_schema not available, "
|
||||
errMsg += "back-end DBMS is MySQL < 5.0"
|
||||
logger.error(errMsg)
|
||||
bruteForce = True
|
||||
|
||||
elif Backend.isDbms(DBMS.ACCESS):
|
||||
errMsg = "cannot retrieve column names, "
|
||||
errMsg += "back-end DBMS is Access"
|
||||
logger.error(errMsg)
|
||||
bruteForce = True
|
||||
elif Backend.isDbms(DBMS.ACCESS):
|
||||
errMsg = "cannot retrieve column names, "
|
||||
errMsg += "back-end DBMS is Access"
|
||||
logger.error(errMsg)
|
||||
bruteForce = True
|
||||
|
||||
if bruteForce:
|
||||
resumeAvailable = False
|
||||
|
@ -1278,6 +1277,9 @@ class Enumeration:
|
|||
errMsg += "table on database '%s'" % conf.db
|
||||
logger.error(errMsg)
|
||||
|
||||
if bruteForce is None:
|
||||
return self.getColumns(onlyColNames=onlyColNames, colTuple=colTuple, bruteForce=True)
|
||||
|
||||
return kb.data.cachedColumns
|
||||
|
||||
def getSchema(self):
|
||||
|
|
Loading…
Reference in New Issue
Block a user