Fixing DeprecationWarning (logger.warn)

This commit is contained in:
Miroslav Stampar
2022-06-22 12:04:34 +02:00
parent 90b444c927
commit df4293473d
99 changed files with 429 additions and 428 deletions

View File

@@ -12,45 +12,45 @@ from plugins.generic.enumeration import Enumeration as GenericEnumeration
class Enumeration(GenericEnumeration):
def getCurrentUser(self):
warnMsg = "on SQLite it is not possible to enumerate the current user"
logger.warn(warnMsg)
logger.warning(warnMsg)
def getCurrentDb(self):
warnMsg = "on SQLite it is not possible to get name of the current database"
logger.warn(warnMsg)
logger.warning(warnMsg)
def isDba(self, user=None):
warnMsg = "on SQLite the current user has all privileges"
logger.warn(warnMsg)
logger.warning(warnMsg)
return True
def getUsers(self):
warnMsg = "on SQLite it is not possible to enumerate the users"
logger.warn(warnMsg)
logger.warning(warnMsg)
return []
def getPasswordHashes(self):
warnMsg = "on SQLite it is not possible to enumerate the user password hashes"
logger.warn(warnMsg)
logger.warning(warnMsg)
return {}
def getPrivileges(self, *args, **kwargs):
warnMsg = "on SQLite it is not possible to enumerate the user privileges"
logger.warn(warnMsg)
logger.warning(warnMsg)
return {}
def getDbs(self):
warnMsg = "on SQLite it is not possible to enumerate databases (use only '--tables')"
logger.warn(warnMsg)
logger.warning(warnMsg)
return []
def searchDb(self):
warnMsg = "on SQLite it is not possible to search databases"
logger.warn(warnMsg)
logger.warning(warnMsg)
return []
@@ -60,10 +60,10 @@ class Enumeration(GenericEnumeration):
def getHostname(self):
warnMsg = "on SQLite it is not possible to enumerate the hostname"
logger.warn(warnMsg)
logger.warning(warnMsg)
def getStatements(self):
warnMsg = "on SQLite it is not possible to enumerate the SQL statements"
logger.warn(warnMsg)
logger.warning(warnMsg)
return []