mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-03-03 19:55:47 +03:00
fix for one silent bug and small language update
This commit is contained in:
parent
2538e2d5b4
commit
1e18168cc8
|
@ -48,7 +48,7 @@ def setHandler():
|
||||||
management system.
|
management system.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
items = (
|
items = [
|
||||||
("MySQL", MYSQL_ALIASES, MySQLMap, MySQLConn),
|
("MySQL", MYSQL_ALIASES, MySQLMap, MySQLConn),
|
||||||
("Oracle", ORACLE_ALIASES, OracleMap, OracleConn),
|
("Oracle", ORACLE_ALIASES, OracleMap, OracleConn),
|
||||||
("PostgreSQL", PGSQL_ALIASES, PostgreSQLMap, PostgreSQLConn),
|
("PostgreSQL", PGSQL_ALIASES, PostgreSQLMap, PostgreSQLConn),
|
||||||
|
@ -59,9 +59,9 @@ def setHandler():
|
||||||
("SAP MaxDB", MAXDB_ALIASES, MaxDBMap, MaxDBConn),
|
("SAP MaxDB", MAXDB_ALIASES, MaxDBMap, MaxDBConn),
|
||||||
("Sybase", SYBASE_ALIASES, SybaseMap, SybaseConn),
|
("Sybase", SYBASE_ALIASES, SybaseMap, SybaseConn),
|
||||||
("IBM DB2", DB2_ALIASES, DB2Map, DB2Conn)
|
("IBM DB2", DB2_ALIASES, DB2Map, DB2Conn)
|
||||||
)
|
]
|
||||||
|
|
||||||
_ = max(_ if Backend.getIdentifiedDbms() in _[1] else None for _ in items)
|
_ = max(_ if (Backend.getIdentifiedDbms() or "").lower() in _[1] else None for _ in items)
|
||||||
if _:
|
if _:
|
||||||
items.remove(_)
|
items.remove(_)
|
||||||
items.insert(0, _)
|
items.insert(0, _)
|
||||||
|
|
|
@ -852,7 +852,7 @@ class Enumeration:
|
||||||
return tableExists(paths.COMMON_TABLES)
|
return tableExists(paths.COMMON_TABLES)
|
||||||
|
|
||||||
infoMsg = "fetching tables for database"
|
infoMsg = "fetching tables for database"
|
||||||
infoMsg += "%s: %s" % ("s" if len(dbs) > 1 else "", ", ".join(db if isinstance(db, basestring) else db[0] for db in sorted(dbs)))
|
infoMsg += "%s: '%s'" % ("s" if len(dbs) > 1 else "", ", ".join(db if isinstance(db, basestring) else db[0] for db in sorted(dbs)))
|
||||||
logger.info(infoMsg)
|
logger.info(infoMsg)
|
||||||
|
|
||||||
rootQuery = queries[Backend.getIdentifiedDbms()].tables
|
rootQuery = queries[Backend.getIdentifiedDbms()].tables
|
||||||
|
@ -1781,7 +1781,7 @@ class Enumeration:
|
||||||
errMsg += "back-end DBMS is MySQL < 5.0"
|
errMsg += "back-end DBMS is MySQL < 5.0"
|
||||||
raise sqlmapUnsupportedFeatureException, errMsg
|
raise sqlmapUnsupportedFeatureException, errMsg
|
||||||
|
|
||||||
infoMsg = "sqlmap will dump entries of all databases' tables now"
|
infoMsg = "sqlmap will dump entries of all tables from all databases now"
|
||||||
logger.info(infoMsg)
|
logger.info(infoMsg)
|
||||||
|
|
||||||
conf.tbl = None
|
conf.tbl = None
|
||||||
|
@ -1791,7 +1791,7 @@ class Enumeration:
|
||||||
|
|
||||||
if kb.data.cachedTables:
|
if kb.data.cachedTables:
|
||||||
if isinstance(kb.data.cachedTables, list):
|
if isinstance(kb.data.cachedTables, list):
|
||||||
kb.data.cachedTables = {None : kb.data.cachedTables}
|
kb.data.cachedTables = { None: kb.data.cachedTables }
|
||||||
|
|
||||||
for db, tables in kb.data.cachedTables.items():
|
for db, tables in kb.data.cachedTables.items():
|
||||||
conf.db = db
|
conf.db = db
|
||||||
|
|
Loading…
Reference in New Issue
Block a user