mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 08:14:24 +03:00
minor refactoring
This commit is contained in:
parent
8d7912ad34
commit
bcf9fc6c6f
|
@ -61,7 +61,6 @@ from lib.core.convert import unicodeencode
|
||||||
from lib.core.convert import urldecode
|
from lib.core.convert import urldecode
|
||||||
from lib.core.convert import urlencode
|
from lib.core.convert import urlencode
|
||||||
from lib.core.enums import DBMS
|
from lib.core.enums import DBMS
|
||||||
from lib.core.enums import DBMS_DIRECTORY_NAME
|
|
||||||
from lib.core.enums import HTTPHEADER
|
from lib.core.enums import HTTPHEADER
|
||||||
from lib.core.enums import HTTPMETHOD
|
from lib.core.enums import HTTPMETHOD
|
||||||
from lib.core.enums import OS
|
from lib.core.enums import OS
|
||||||
|
@ -84,6 +83,7 @@ from lib.core.settings import DUMMY_USER_INJECTION
|
||||||
from lib.core.settings import INFERENCE_UNKNOWN_CHAR
|
from lib.core.settings import INFERENCE_UNKNOWN_CHAR
|
||||||
from lib.core.settings import UNICODE_ENCODING
|
from lib.core.settings import UNICODE_ENCODING
|
||||||
from lib.core.settings import DBMS_DICT
|
from lib.core.settings import DBMS_DICT
|
||||||
|
from lib.core.settings import DBMS_DIRECTORY_DICT
|
||||||
from lib.core.settings import DESCRIPTION
|
from lib.core.settings import DESCRIPTION
|
||||||
from lib.core.settings import DUMMY_SQL_INJECTION_CHARS
|
from lib.core.settings import DUMMY_SQL_INJECTION_CHARS
|
||||||
from lib.core.settings import NULL
|
from lib.core.settings import NULL
|
||||||
|
@ -1813,9 +1813,7 @@ def getSPLSnippet(dbms, name, **variables):
|
||||||
Returns content of SPL snippet located inside "procs" directory
|
Returns content of SPL snippet located inside "procs" directory
|
||||||
"""
|
"""
|
||||||
|
|
||||||
_ = { DBMS.MSSQL: DBMS_DIRECTORY_NAME.MSSQL, DBMS.PGSQL: DBMS_DIRECTORY_NAME.PGSQL }
|
filename = os.path.join(paths.SQLMAP_PROCS_PATH, DBMS_DIRECTORY_DICT[dbms], "%s.txt" % name)
|
||||||
|
|
||||||
filename = os.path.join(paths.SQLMAP_PROCS_PATH, _[dbms], "%s.txt" % name)
|
|
||||||
checkFile(filename)
|
checkFile(filename)
|
||||||
retVal = readCachedFileContent(filename)
|
retVal = readCachedFileContent(filename)
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ import sys
|
||||||
|
|
||||||
from lib.core.enums import CUSTOM_LOGGING
|
from lib.core.enums import CUSTOM_LOGGING
|
||||||
from lib.core.enums import DBMS
|
from lib.core.enums import DBMS
|
||||||
|
from lib.core.enums import DBMS_DIRECTORY_NAME
|
||||||
from lib.core.enums import PLACE
|
from lib.core.enums import PLACE
|
||||||
from lib.core.revision import getRevisionNumber
|
from lib.core.revision import getRevisionNumber
|
||||||
|
|
||||||
|
@ -167,6 +168,8 @@ MAXDB_ALIASES = ( "maxdb", "sap maxdb", "sap db" )
|
||||||
SYBASE_ALIASES = ( "sybase", "sybase sql server" )
|
SYBASE_ALIASES = ( "sybase", "sybase sql server" )
|
||||||
DB2_ALIASES = ( "db2", "ibm db2", "ibmdb2" )
|
DB2_ALIASES = ( "db2", "ibm db2", "ibmdb2" )
|
||||||
|
|
||||||
|
DBMS_DIRECTORY_DICT = dict((getattr(DBMS, _), getattr(DBMS_DIRECTORY_NAME, _)) for _ in dir(DBMS) if not _.startswith("_"))
|
||||||
|
|
||||||
SUPPORTED_DBMS = MSSQL_ALIASES + MYSQL_ALIASES + PGSQL_ALIASES + ORACLE_ALIASES + SQLITE_ALIASES + ACCESS_ALIASES + FIREBIRD_ALIASES + MAXDB_ALIASES + SYBASE_ALIASES + DB2_ALIASES
|
SUPPORTED_DBMS = MSSQL_ALIASES + MYSQL_ALIASES + PGSQL_ALIASES + ORACLE_ALIASES + SQLITE_ALIASES + ACCESS_ALIASES + FIREBIRD_ALIASES + MAXDB_ALIASES + SYBASE_ALIASES + DB2_ALIASES
|
||||||
SUPPORTED_OS = ( "linux", "windows" )
|
SUPPORTED_OS = ( "linux", "windows" )
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user