mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 13:11:29 +00:00
Major code refactoring - moved to one location only (getIdentifiedDBMS() in common.py) the retrieval of identified/fingerprinted DBMS.
Minor bug fixes thanks to previous refactoring too.
This commit is contained in:
@@ -8,6 +8,7 @@ See the file 'doc/COPYING' for copying permission
|
||||
"""
|
||||
|
||||
from lib.core.agent import agent
|
||||
from lib.core.common import getIdentifiedDBMS
|
||||
from lib.core.common import getRange
|
||||
from lib.core.common import isNumPosStrValue
|
||||
from lib.core.common import isTechniqueAvailable
|
||||
@@ -29,7 +30,7 @@ class Enumeration(GenericEnumeration):
|
||||
def getRoles(self, query2=False):
|
||||
infoMsg = "fetching database users roles"
|
||||
|
||||
rootQuery = queries[kb.dbms].roles
|
||||
rootQuery = queries[getIdentifiedDBMS()].roles
|
||||
|
||||
if conf.user == "CU":
|
||||
infoMsg += " for current user"
|
||||
@@ -178,7 +179,7 @@ class Enumeration(GenericEnumeration):
|
||||
return []
|
||||
|
||||
def searchColumn(self):
|
||||
rootQuery = queries[kb.dbms].search_column
|
||||
rootQuery = queries[getIdentifiedDBMS()].search_column
|
||||
foundCols = {}
|
||||
dbs = { "USERS": {} }
|
||||
colList = conf.col.split(",")
|
||||
|
||||
@@ -13,6 +13,7 @@ from lib.core.agent import agent
|
||||
from lib.core.common import formatDBMSfp
|
||||
from lib.core.common import formatFingerprint
|
||||
from lib.core.common import getErrorParsedDBMSesFormatted
|
||||
from lib.core.common import getIdentifiedDBMS
|
||||
from lib.core.data import conf
|
||||
from lib.core.data import kb
|
||||
from lib.core.data import logger
|
||||
@@ -64,7 +65,7 @@ class Fingerprint(GenericFingerprint):
|
||||
return value
|
||||
|
||||
def checkDbms(self):
|
||||
if (kb.dbms is not None and kb.dbms.lower() in ORACLE_ALIASES) or conf.dbms in ORACLE_ALIASES:
|
||||
if (getIdentifiedDBMS() is not None and getIdentifiedDBMS().lower() in ORACLE_ALIASES) or conf.dbms in ORACLE_ALIASES:
|
||||
setDbms(DBMS.ORACLE)
|
||||
|
||||
self.getBanner()
|
||||
|
||||
Reference in New Issue
Block a user