fix for one silent bug and small language update

This commit is contained in:
Miroslav Stampar 2012-05-23 16:35:40 +00:00
parent 2538e2d5b4
commit 1e18168cc8
2 changed files with 6 additions and 6 deletions

View File

@ -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, _)

View File

@ -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