mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-16 19:40:37 +03:00
Fixes #3674
This commit is contained in:
parent
d815e6c278
commit
aa5645c71a
|
@ -18,7 +18,7 @@ from lib.core.enums import OS
|
||||||
from thirdparty.six import unichr as _unichr
|
from thirdparty.six import unichr as _unichr
|
||||||
|
|
||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||||
VERSION = "1.3.5.100"
|
VERSION = "1.3.5.102"
|
||||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
||||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||||
|
|
|
@ -293,31 +293,34 @@ class Databases:
|
||||||
values = [(dbs[0], _) for _ in values]
|
values = [(dbs[0], _) for _ in values]
|
||||||
|
|
||||||
for db, table in filterPairValues(values):
|
for db, table in filterPairValues(values):
|
||||||
db = safeSQLIdentificatorNaming(db)
|
table = unArrayizeValue(table)
|
||||||
table = safeSQLIdentificatorNaming(unArrayizeValue(table), True)
|
|
||||||
|
|
||||||
if conf.getComments:
|
if not isNoneValue(table):
|
||||||
_ = queries[Backend.getIdentifiedDbms()].table_comment
|
db = safeSQLIdentificatorNaming(db)
|
||||||
if hasattr(_, "query"):
|
table = safeSQLIdentificatorNaming(table, True)
|
||||||
if Backend.getIdentifiedDbms() in (DBMS.ORACLE, DBMS.DB2):
|
|
||||||
query = _.query % (unsafeSQLIdentificatorNaming(db.upper()), unsafeSQLIdentificatorNaming(table.upper()))
|
if conf.getComments:
|
||||||
|
_ = queries[Backend.getIdentifiedDbms()].table_comment
|
||||||
|
if hasattr(_, "query"):
|
||||||
|
if Backend.getIdentifiedDbms() in (DBMS.ORACLE, DBMS.DB2):
|
||||||
|
query = _.query % (unsafeSQLIdentificatorNaming(db.upper()), unsafeSQLIdentificatorNaming(table.upper()))
|
||||||
|
else:
|
||||||
|
query = _.query % (unsafeSQLIdentificatorNaming(db), unsafeSQLIdentificatorNaming(table))
|
||||||
|
|
||||||
|
comment = unArrayizeValue(inject.getValue(query, blind=False, time=False))
|
||||||
|
if not isNoneValue(comment):
|
||||||
|
infoMsg = "retrieved comment '%s' for table '%s' " % (comment, unsafeSQLIdentificatorNaming(table))
|
||||||
|
infoMsg += "in database '%s'" % unsafeSQLIdentificatorNaming(db)
|
||||||
|
logger.info(infoMsg)
|
||||||
else:
|
else:
|
||||||
query = _.query % (unsafeSQLIdentificatorNaming(db), unsafeSQLIdentificatorNaming(table))
|
warnMsg = "on %s it is not " % Backend.getIdentifiedDbms()
|
||||||
|
warnMsg += "possible to get column comments"
|
||||||
|
singleTimeWarnMessage(warnMsg)
|
||||||
|
|
||||||
comment = unArrayizeValue(inject.getValue(query, blind=False, time=False))
|
if db not in kb.data.cachedTables:
|
||||||
if not isNoneValue(comment):
|
kb.data.cachedTables[db] = [table]
|
||||||
infoMsg = "retrieved comment '%s' for table '%s' " % (comment, unsafeSQLIdentificatorNaming(table))
|
|
||||||
infoMsg += "in database '%s'" % unsafeSQLIdentificatorNaming(db)
|
|
||||||
logger.info(infoMsg)
|
|
||||||
else:
|
else:
|
||||||
warnMsg = "on %s it is not " % Backend.getIdentifiedDbms()
|
kb.data.cachedTables[db].append(table)
|
||||||
warnMsg += "possible to get column comments"
|
|
||||||
singleTimeWarnMessage(warnMsg)
|
|
||||||
|
|
||||||
if db not in kb.data.cachedTables:
|
|
||||||
kb.data.cachedTables[db] = [table]
|
|
||||||
else:
|
|
||||||
kb.data.cachedTables[db].append(table)
|
|
||||||
|
|
||||||
if not kb.data.cachedTables and isInferenceAvailable() and not conf.direct:
|
if not kb.data.cachedTables and isInferenceAvailable() and not conf.direct:
|
||||||
for db in dbs:
|
for db in dbs:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user