mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-09 06:01:29 +00:00
Fixing DeprecationWarning (logger.warn)
This commit is contained in:
@@ -48,7 +48,7 @@ class Connector(GenericConnector):
|
||||
|
||||
except (self.__sqlite.DatabaseError, self.__sqlite.OperationalError):
|
||||
warnMsg = "unable to connect using SQLite 3 library, trying with SQLite 2"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
try:
|
||||
try:
|
||||
|
||||
@@ -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 []
|
||||
|
||||
@@ -86,7 +86,7 @@ class Fingerprint(GenericFingerprint):
|
||||
|
||||
if not result:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.SQLITE
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
else:
|
||||
@@ -104,7 +104,7 @@ class Fingerprint(GenericFingerprint):
|
||||
return True
|
||||
else:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.SQLITE
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user