mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-10 09:49:06 +00:00
Some more refactoring
This commit is contained in:
@@ -10,6 +10,6 @@ from plugins.generic.connector import Connector as GenericConnector
|
||||
|
||||
class Connector(GenericConnector):
|
||||
def connect(self):
|
||||
errMsg = "on Raima it is not (currently) possible to establish a "
|
||||
errMsg = "on Raima Database Manager it is not (currently) possible to establish a "
|
||||
errMsg += "direct connection"
|
||||
raise SqlmapUnsupportedFeatureException(errMsg)
|
||||
|
||||
@@ -10,75 +10,75 @@ from plugins.generic.enumeration import Enumeration as GenericEnumeration
|
||||
|
||||
class Enumeration(GenericEnumeration):
|
||||
def getBanner(self):
|
||||
warnMsg = "on Raima it is not possible to get the banner"
|
||||
warnMsg = "on Raima Database Manager it is not possible to get the banner"
|
||||
logger.warn(warnMsg)
|
||||
|
||||
return None
|
||||
|
||||
def getCurrentUser(self):
|
||||
warnMsg = "on Raima it is not possible to enumerate the current user"
|
||||
warnMsg = "on Raima Database Manager it is not possible to enumerate the current user"
|
||||
logger.warn(warnMsg)
|
||||
|
||||
def getCurrentDb(self):
|
||||
warnMsg = "on Raima it is not possible to get name of the current database"
|
||||
warnMsg = "on Raima Database Manager it is not possible to get name of the current database"
|
||||
logger.warn(warnMsg)
|
||||
|
||||
def isDba(self, user=None):
|
||||
warnMsg = "on Raima it is not possible to test if current user is DBA"
|
||||
warnMsg = "on Raima Database Manager it is not possible to test if current user is DBA"
|
||||
logger.warn(warnMsg)
|
||||
|
||||
def getUsers(self):
|
||||
warnMsg = "on Raima it is not possible to enumerate the users"
|
||||
warnMsg = "on Raima Database Manager it is not possible to enumerate the users"
|
||||
logger.warn(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def getPasswordHashes(self):
|
||||
warnMsg = "on Raima it is not possible to enumerate the user password hashes"
|
||||
warnMsg = "on Raima Database Manager it is not possible to enumerate the user password hashes"
|
||||
logger.warn(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def getPrivileges(self, *args, **kwargs):
|
||||
warnMsg = "on Raima it is not possible to enumerate the user privileges"
|
||||
warnMsg = "on Raima Database Manager it is not possible to enumerate the user privileges"
|
||||
logger.warn(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def getDbs(self):
|
||||
warnMsg = "on Raima it is not possible to enumerate databases (use only '--tables')"
|
||||
warnMsg = "on Raima Database Manager it is not possible to enumerate databases (use only '--tables')"
|
||||
logger.warn(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def searchDb(self):
|
||||
warnMsg = "on Raima it is not possible to search databases"
|
||||
warnMsg = "on Raima Database Manager it is not possible to search databases"
|
||||
logger.warn(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def searchTable(self):
|
||||
warnMsg = "on Raima it is not possible to search tables"
|
||||
warnMsg = "on Raima Database Manager it is not possible to search tables"
|
||||
logger.warn(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def searchColumn(self):
|
||||
warnMsg = "on Raima it is not possible to search columns"
|
||||
warnMsg = "on Raima Database Manager it is not possible to search columns"
|
||||
logger.warn(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def search(self):
|
||||
warnMsg = "on Raima search option is not available"
|
||||
warnMsg = "on Raima Database Manager search option is not available"
|
||||
logger.warn(warnMsg)
|
||||
|
||||
def getHostname(self):
|
||||
warnMsg = "on Raima it is not possible to enumerate the hostname"
|
||||
warnMsg = "on Raima Database Manager it is not possible to enumerate the hostname"
|
||||
logger.warn(warnMsg)
|
||||
|
||||
def getStatements(self):
|
||||
warnMsg = "on Raima it is not possible to enumerate the SQL statements"
|
||||
warnMsg = "on Raima Database Manager it is not possible to enumerate the SQL statements"
|
||||
logger.warn(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
@@ -10,9 +10,9 @@ from plugins.generic.filesystem import Filesystem as GenericFilesystem
|
||||
|
||||
class Filesystem(GenericFilesystem):
|
||||
def readFile(self, remoteFile):
|
||||
errMsg = "on Raima it is not possible to read files"
|
||||
errMsg = "on Raima Database Manager it is not possible to read files"
|
||||
raise SqlmapUnsupportedFeatureException(errMsg)
|
||||
|
||||
def writeFile(self, localFile, remoteFile, fileType=None, forceCheck=False):
|
||||
errMsg = "on Raima it is not possible to write files"
|
||||
errMsg = "on Raima Database Manager it is not possible to write files"
|
||||
raise SqlmapUnsupportedFeatureException(errMsg)
|
||||
|
||||
@@ -10,19 +10,19 @@ from plugins.generic.takeover import Takeover as GenericTakeover
|
||||
|
||||
class Takeover(GenericTakeover):
|
||||
def osCmd(self):
|
||||
errMsg = "on Raima it is not possible to execute commands"
|
||||
errMsg = "on Raima Database Manager it is not possible to execute commands"
|
||||
raise SqlmapUnsupportedFeatureException(errMsg)
|
||||
|
||||
def osShell(self):
|
||||
errMsg = "on Raima it is not possible to execute commands"
|
||||
errMsg = "on Raima Database Manager it is not possible to execute commands"
|
||||
raise SqlmapUnsupportedFeatureException(errMsg)
|
||||
|
||||
def osPwn(self):
|
||||
errMsg = "on Raima it is not possible to establish an "
|
||||
errMsg = "on Raima Database Manager it is not possible to establish an "
|
||||
errMsg += "out-of-band connection"
|
||||
raise SqlmapUnsupportedFeatureException(errMsg)
|
||||
|
||||
def osSmb(self):
|
||||
errMsg = "on Raima it is not possible to establish an "
|
||||
errMsg = "on Raima Database Manager it is not possible to establish an "
|
||||
errMsg += "out-of-band connection"
|
||||
raise SqlmapUnsupportedFeatureException(errMsg)
|
||||
|
||||
@@ -540,8 +540,8 @@ class Databases(object):
|
||||
|
||||
elif Backend.getIdentifiedDbms() in (DBMS.ACCESS, DBMS.MCKOI, DBMS.EXTREMEDB, DBMS.RAIMA):
|
||||
warnMsg = "cannot retrieve column names, "
|
||||
warnMsg += "back-end DBMS is %s" % Backend.getIdentifiedDbms()
|
||||
logger.warn(warnMsg)
|
||||
warnMsg += "back-end DBMS is '%s'" % Backend.getIdentifiedDbms()
|
||||
singleTimeWarnMessage(warnMsg)
|
||||
bruteForce = True
|
||||
|
||||
if bruteForce:
|
||||
@@ -571,12 +571,17 @@ class Databases(object):
|
||||
|
||||
return kb.data.cachedColumns
|
||||
|
||||
message = "do you want to use common column existence check? %s" % ("[Y/n/q]" if Backend.getIdentifiedDbms() in (DBMS.ACCESS, DBMS.MCKOI, DBMS.EXTREMEDB) else "[y/N/q]")
|
||||
choice = readInput(message, default='Y' if 'Y' in message else 'N').upper()
|
||||
if kb.choices.columnExists is None:
|
||||
message = "do you want to use common column existence check? %s" % ("[Y/n/q]" if Backend.getIdentifiedDbms() in (DBMS.ACCESS, DBMS.MCKOI, DBMS.EXTREMEDB) else "[y/N/q]")
|
||||
kb.choices.columnExists = readInput(message, default='Y' if 'Y' in message else 'N').upper()
|
||||
|
||||
if choice == 'N':
|
||||
return
|
||||
elif choice == 'Q':
|
||||
if kb.choices.columnExists == 'N':
|
||||
if dumpMode and colList:
|
||||
kb.data.cachedColumns[safeSQLIdentificatorNaming(conf.db)] = {safeSQLIdentificatorNaming(tbl, True): dict((_, None) for _ in colList)}
|
||||
return kb.data.cachedColumns
|
||||
else:
|
||||
return None
|
||||
elif kb.choices.columnExists == 'Q':
|
||||
raise SqlmapUserQuitException
|
||||
else:
|
||||
return columnExists(paths.COMMON_COLUMNS)
|
||||
|
||||
Reference in New Issue
Block a user