mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 01:26:42 +03:00
Minor code restyling
This commit is contained in:
parent
4b02ed45fa
commit
2fcbb57e1c
|
@ -41,6 +41,7 @@ from lib.core.exception import sqlmapNoneDataException
|
|||
from lib.core.exception import sqlmapSyntaxException
|
||||
from lib.core.session import setDbms
|
||||
from lib.core.settings import MSSQL_ALIASES
|
||||
from lib.core.settings import MSSQL_SYSTEM_DBS
|
||||
from lib.core.unescaper import unescaper
|
||||
from lib.parse.banner import bannerParser
|
||||
from lib.request import inject
|
||||
|
@ -59,6 +60,7 @@ class MSSQLServerMap(Fingerprint, Enumeration, Filesystem, Takeover):
|
|||
"""
|
||||
|
||||
def __init__(self):
|
||||
self.excludeDbsList = MSSQL_SYSTEM_DBS
|
||||
Enumeration.__init__(self, "Microsoft SQL Server")
|
||||
|
||||
unescaper.setUnescape(MSSQLServerMap.unescape)
|
||||
|
|
|
@ -40,6 +40,7 @@ from lib.core.data import paths
|
|||
from lib.core.exception import sqlmapSyntaxException
|
||||
from lib.core.session import setDbms
|
||||
from lib.core.settings import MYSQL_ALIASES
|
||||
from lib.core.settings import MYSQL_SYSTEM_DBS
|
||||
from lib.core.shell import autoCompletion
|
||||
from lib.core.unescaper import unescaper
|
||||
from lib.request import inject
|
||||
|
@ -58,6 +59,7 @@ class MySQLMap(Fingerprint, Enumeration, Filesystem, Takeover):
|
|||
"""
|
||||
|
||||
def __init__(self):
|
||||
self.excludeDbsList = MYSQL_SYSTEM_DBS
|
||||
Enumeration.__init__(self, "MySQL")
|
||||
|
||||
unescaper.setUnescape(MySQLMap.unescape)
|
||||
|
|
|
@ -52,6 +52,7 @@ class OracleMap(Fingerprint, Enumeration, Filesystem, Takeover):
|
|||
|
||||
|
||||
def __init__(self):
|
||||
self.excludeDbsList = ORACLE_SYSTEM_DBS
|
||||
Enumeration.__init__(self, "Oracle")
|
||||
|
||||
unescaper.setUnescape(OracleMap.unescape)
|
||||
|
|
|
@ -52,6 +52,7 @@ class PostgreSQLMap(Fingerprint, Enumeration, Filesystem, Takeover):
|
|||
"""
|
||||
|
||||
def __init__(self):
|
||||
self.excludeDbsList = PGSQL_SYSTEM_DBS
|
||||
Enumeration.__init__(self, "PostgreSQL")
|
||||
|
||||
unescaper.setUnescape(PostgreSQLMap.unescape)
|
||||
|
|
|
@ -39,10 +39,6 @@ from lib.core.exception import sqlmapMissingMandatoryOptionException
|
|||
from lib.core.exception import sqlmapNoneDataException
|
||||
from lib.core.exception import sqlmapUndefinedMethod
|
||||
from lib.core.exception import sqlmapUnsupportedFeatureException
|
||||
from lib.core.settings import MYSQL_SYSTEM_DBS
|
||||
from lib.core.settings import PGSQL_SYSTEM_DBS
|
||||
from lib.core.settings import ORACLE_SYSTEM_DBS
|
||||
from lib.core.settings import MSSQL_SYSTEM_DBS
|
||||
from lib.core.shell import autoCompletion
|
||||
from lib.request import inject
|
||||
from lib.request.connect import Connect as Request
|
||||
|
@ -70,15 +66,6 @@ class Enumeration:
|
|||
|
||||
temp.inference = queries[dbms].inference
|
||||
|
||||
if dbms == "MySQL":
|
||||
self.excludeDbsList = MYSQL_SYSTEM_DBS
|
||||
elif dbms == "PostgreSQL":
|
||||
self.excludeDbsList = PGSQL_SYSTEM_DBS
|
||||
elif dbms == "Oracle":
|
||||
self.excludeDbsList = ORACLE_SYSTEM_DBS
|
||||
elif dbms == "Microsoft SQL Server":
|
||||
self.excludeDbsList = MSSQL_SYSTEM_DBS
|
||||
|
||||
|
||||
def forceDbmsEnum(self):
|
||||
pass
|
||||
|
@ -535,7 +522,7 @@ class Enumeration:
|
|||
if kb.dbms == "MySQL" and not self.has_information_schema:
|
||||
warnMsg = "information_schema not available, "
|
||||
warnMsg += "back-end DBMS is MySQL < 5. database "
|
||||
warnMsg += "names will be fetched from 'mysql' table"
|
||||
warnMsg += "names will be fetched from 'mysql' database"
|
||||
logger.warn(warnMsg)
|
||||
|
||||
logMsg = "fetching database names"
|
||||
|
|
Loading…
Reference in New Issue
Block a user