mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-03-03 11:45:46 +03:00
optimization - now if DBMS was detected by error based HTML parser, then it's moved at the first place for testing
This commit is contained in:
parent
729156e91c
commit
a97319656c
|
@ -47,7 +47,7 @@ def setHandler():
|
|||
|
||||
count = 0
|
||||
dbmsNames = ( "MySQL", "Oracle", "PostgreSQL", "Microsoft SQL Server", "SQLite", "Microsoft Access", "Firebird", "SAP MaxDB", "Sybase" )
|
||||
dbmsMap = (
|
||||
dbmsMap = [
|
||||
( MYSQL_ALIASES, MySQLMap, MySQLConn ),
|
||||
( ORACLE_ALIASES, OracleMap, OracleConn ),
|
||||
( PGSQL_ALIASES, PostgreSQLMap, PostgreSQLConn ),
|
||||
|
@ -57,7 +57,18 @@ def setHandler():
|
|||
( FIREBIRD_ALIASES, FirebirdMap, FirebirdConn ),
|
||||
( MAXDB_ALIASES, MaxDBMap, MaxDBConn ),
|
||||
( SYBASE_ALIASES, SybaseMap, SybaseConn ),
|
||||
)
|
||||
]
|
||||
|
||||
if kb.htmlFp:
|
||||
for i in xrange(len(dbmsMap)):
|
||||
dbmsAliases, _, _ = dbmsMap[i]
|
||||
if kb.htmlFp[-1].lower() in dbmsAliases:
|
||||
if i > 0:
|
||||
temp = dbmsMap[i]
|
||||
dbmsMap.remove(temp)
|
||||
dbmsMap.insert(0, temp)
|
||||
break
|
||||
|
||||
|
||||
for dbmsAliases, dbmsMap, dbmsConn in dbmsMap:
|
||||
if conf.dbms and conf.dbms not in dbmsAliases:
|
||||
|
|
Loading…
Reference in New Issue
Block a user