mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-02 20:54:13 +03:00
Consider also --dbms value during the detection phase
This commit is contained in:
parent
be6df7abd9
commit
2efb3b78ea
|
@ -108,12 +108,20 @@ def checkSqlInjection(place, parameter, value):
|
|||
|
||||
# Skip DBMS-specific tests if they do not match the DBMS
|
||||
# identified
|
||||
if injection.dbms is not None and injection.dbms != dbms:
|
||||
debugMsg = "skipping test '%s' because " % title
|
||||
debugMsg += "the back-end DBMS is %s" % injection.dbms
|
||||
logger.debug(debugMsg)
|
||||
if dbms is not None:
|
||||
if injection.dbms is not None and injection.dbms != dbms:
|
||||
debugMsg = "skipping test '%s' because " % title
|
||||
debugMsg += "the back-end DBMS is %s" % injection.dbms
|
||||
logger.debug(debugMsg)
|
||||
|
||||
continue
|
||||
continue
|
||||
|
||||
if conf.dbms is not None and conf.dbms.lower() != dbms.lower():
|
||||
debugMsg = "skipping test '%s' because " % title
|
||||
debugMsg += "the provided DBMS is %s" % conf.dbms
|
||||
logger.debug(debugMsg)
|
||||
|
||||
continue
|
||||
|
||||
infoMsg = "testing '%s'" % title
|
||||
logger.info(infoMsg)
|
||||
|
|
|
@ -63,6 +63,15 @@ from lib.core.settings import SITE
|
|||
from lib.core.settings import SUPPORTED_DBMS
|
||||
from lib.core.settings import SUPPORTED_OS
|
||||
from lib.core.settings import VERSION_STRING
|
||||
from lib.core.settings import MSSQL_ALIASES
|
||||
from lib.core.settings import MYSQL_ALIASES
|
||||
from lib.core.settings import PGSQL_ALIASES
|
||||
from lib.core.settings import ORACLE_ALIASES
|
||||
from lib.core.settings import SQLITE_ALIASES
|
||||
from lib.core.settings import ACCESS_ALIASES
|
||||
from lib.core.settings import FIREBIRD_ALIASES
|
||||
from lib.core.settings import MAXDB_ALIASES
|
||||
from lib.core.settings import SYBASE_ALIASES
|
||||
from lib.core.update import update
|
||||
from lib.parse.configfile import configFileParser
|
||||
from lib.parse.payloads import loadPayloads
|
||||
|
@ -588,6 +597,14 @@ def __setDBMS():
|
|||
errMsg += "fingerprint it for you."
|
||||
raise sqlmapUnsupportedDBMSException, errMsg
|
||||
|
||||
for aliases in (MSSQL_ALIASES, MYSQL_ALIASES, PGSQL_ALIASES, \
|
||||
ORACLE_ALIASES, SQLITE_ALIASES, ACCESS_ALIASES, \
|
||||
FIREBIRD_ALIASES, MAXDB_ALIASES, SYBASE_ALIASES):
|
||||
if conf.dbms in aliases:
|
||||
conf.dbms = aliases[0]
|
||||
|
||||
break
|
||||
|
||||
def __setTamperingFunctions():
|
||||
"""
|
||||
Loads tampering functions from given script(s)
|
||||
|
|
Loading…
Reference in New Issue
Block a user