mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-29 02:49:01 +00:00
Fixing DeprecationWarning (logger.warn)
This commit is contained in:
@@ -11,74 +11,74 @@ from plugins.generic.enumeration import Enumeration as GenericEnumeration
|
||||
class Enumeration(GenericEnumeration):
|
||||
def getBanner(self):
|
||||
warnMsg = "on Microsoft Access it is not possible to get the banner"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return None
|
||||
|
||||
def getCurrentUser(self):
|
||||
warnMsg = "on Microsoft Access it is not possible to enumerate the current user"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def getCurrentDb(self):
|
||||
warnMsg = "on Microsoft Access it is not possible to get name of the current database"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def isDba(self, user=None):
|
||||
warnMsg = "on Microsoft Access it is not possible to test if current user is DBA"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def getUsers(self):
|
||||
warnMsg = "on Microsoft Access it is not possible to enumerate the users"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def getPasswordHashes(self):
|
||||
warnMsg = "on Microsoft Access it is not possible to enumerate the user password hashes"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def getPrivileges(self, *args, **kwargs):
|
||||
warnMsg = "on Microsoft Access it is not possible to enumerate the user privileges"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def getDbs(self):
|
||||
warnMsg = "on Microsoft Access it is not possible to enumerate databases (use only '--tables')"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def searchDb(self):
|
||||
warnMsg = "on Microsoft Access it is not possible to search databases"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def searchTable(self):
|
||||
warnMsg = "on Microsoft Access it is not possible to search tables"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def searchColumn(self):
|
||||
warnMsg = "on Microsoft Access it is not possible to search columns"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def search(self):
|
||||
warnMsg = "on Microsoft Access search option is not available"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def getHostname(self):
|
||||
warnMsg = "on Microsoft Access it is not possible to enumerate the hostname"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def getStatements(self):
|
||||
warnMsg = "on Microsoft Access it is not possible to enumerate the SQL statements"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
@@ -166,7 +166,7 @@ class Fingerprint(GenericFingerprint):
|
||||
|
||||
if not result:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.ACCESS
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
return False
|
||||
|
||||
setDbms(DBMS.ACCESS)
|
||||
@@ -185,7 +185,7 @@ class Fingerprint(GenericFingerprint):
|
||||
return True
|
||||
else:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.ACCESS
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
|
||||
@@ -11,10 +11,10 @@ from plugins.generic.enumeration import Enumeration as GenericEnumeration
|
||||
class Enumeration(GenericEnumeration):
|
||||
def getStatements(self):
|
||||
warnMsg = "on Altibase it is not possible to enumerate the SQL statements"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def getHostname(self):
|
||||
warnMsg = "on Altibase it is not possible to enumerate the hostname"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
@@ -79,7 +79,7 @@ class Fingerprint(GenericFingerprint):
|
||||
|
||||
if not result:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.ALTIBASE
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -90,6 +90,6 @@ class Fingerprint(GenericFingerprint):
|
||||
return True
|
||||
else:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.ALTIBASE
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
12
plugins/dbms/cache/enumeration.py
vendored
12
plugins/dbms/cache/enumeration.py
vendored
@@ -15,34 +15,34 @@ class Enumeration(GenericEnumeration):
|
||||
|
||||
def getUsers(self):
|
||||
warnMsg = "on Cache it is not possible to enumerate the users"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def getPasswordHashes(self):
|
||||
warnMsg = "on Cache it is not possible to enumerate password hashes"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def getPrivileges(self, *args, **kwargs):
|
||||
warnMsg = "on Cache it is not possible to enumerate the user privileges"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def getStatements(self):
|
||||
warnMsg = "on Cache it is not possible to enumerate the SQL statements"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def getRoles(self, *args, **kwargs):
|
||||
warnMsg = "on Cache it is not possible to enumerate the user roles"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def getHostname(self):
|
||||
warnMsg = "on Cache it is not possible to enumerate the hostname"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
4
plugins/dbms/cache/fingerprint.py
vendored
4
plugins/dbms/cache/fingerprint.py
vendored
@@ -97,7 +97,7 @@ class Fingerprint(GenericFingerprint):
|
||||
|
||||
if not result:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.CACHE
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -108,6 +108,6 @@ class Fingerprint(GenericFingerprint):
|
||||
return True
|
||||
else:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.CACHE
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -46,7 +46,7 @@ class Connector(GenericConnector):
|
||||
try:
|
||||
return self.cursor.fetchall()
|
||||
except psycopg2.ProgrammingError as ex:
|
||||
logger.warn(getSafeExString(ex))
|
||||
logger.warning(getSafeExString(ex))
|
||||
return None
|
||||
|
||||
def execute(self, query):
|
||||
@@ -56,7 +56,7 @@ class Connector(GenericConnector):
|
||||
self.cursor.execute(query)
|
||||
retVal = True
|
||||
except (psycopg2.OperationalError, psycopg2.ProgrammingError) as ex:
|
||||
logger.warn(("(remote) '%s'" % getSafeExString(ex)).strip())
|
||||
logger.warning(("(remote) '%s'" % getSafeExString(ex)).strip())
|
||||
except psycopg2.InternalError as ex:
|
||||
raise SqlmapConnectionException(getSafeExString(ex))
|
||||
|
||||
|
||||
@@ -11,12 +11,12 @@ from plugins.generic.enumeration import Enumeration as GenericEnumeration
|
||||
class Enumeration(GenericEnumeration):
|
||||
def getPasswordHashes(self):
|
||||
warnMsg = "on CrateDB it is not possible to enumerate the user password hashes"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def getRoles(self, *args, **kwargs):
|
||||
warnMsg = "on CrateDB it is not possible to enumerate the user roles"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
@@ -78,7 +78,7 @@ class Fingerprint(GenericFingerprint):
|
||||
|
||||
if not result:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.CRATEDB
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -89,6 +89,6 @@ class Fingerprint(GenericFingerprint):
|
||||
return True
|
||||
else:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.CRATEDB
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -11,22 +11,22 @@ from plugins.generic.enumeration import Enumeration as GenericEnumeration
|
||||
class Enumeration(GenericEnumeration):
|
||||
def getPasswordHashes(self):
|
||||
warnMsg = "on Cubrid it is not possible to enumerate password hashes"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def getStatements(self):
|
||||
warnMsg = "on Cubrid it is not possible to enumerate the SQL statements"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def getRoles(self, *args, **kwargs):
|
||||
warnMsg = "on Cubrid it is not possible to enumerate the user roles"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def getHostname(self):
|
||||
warnMsg = "on Cubrid it is not possible to enumerate the hostname"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
@@ -78,7 +78,7 @@ class Fingerprint(GenericFingerprint):
|
||||
|
||||
if not result:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.CUBRID
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -89,6 +89,6 @@ class Fingerprint(GenericFingerprint):
|
||||
return True
|
||||
else:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.CUBRID
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -11,12 +11,12 @@ from plugins.generic.enumeration import Enumeration as GenericEnumeration
|
||||
class Enumeration(GenericEnumeration):
|
||||
def getPasswordHashes(self):
|
||||
warnMsg = "on IBM DB2 it is not possible to enumerate password hashes"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def getStatements(self):
|
||||
warnMsg = "on IBM DB2 it is not possible to enumerate the SQL statements"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
@@ -101,7 +101,7 @@ class Fingerprint(GenericFingerprint):
|
||||
|
||||
if not result:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.DB2
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -115,7 +115,7 @@ class Fingerprint(GenericFingerprint):
|
||||
return True
|
||||
else:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.DB2
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
|
||||
@@ -12,31 +12,31 @@ from plugins.generic.enumeration import Enumeration as GenericEnumeration
|
||||
class Enumeration(GenericEnumeration):
|
||||
def getPasswordHashes(self):
|
||||
warnMsg = "on Apache Derby it is not possible to enumerate password hashes"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def getStatements(self):
|
||||
warnMsg = "on Apache Derby it is not possible to enumerate the SQL statements"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def getPrivileges(self, *args, **kwargs):
|
||||
warnMsg = "on Apache Derby it is not possible to enumerate the user privileges"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def getRoles(self, *args, **kwargs):
|
||||
warnMsg = "on Apache Derby it is not possible to enumerate the user roles"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def getHostname(self):
|
||||
warnMsg = "on Apache Derby it is not possible to enumerate the hostname"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def getBanner(self):
|
||||
warnMsg = "on Apache Derby it is not possible to enumerate the banner"
|
||||
|
||||
@@ -78,7 +78,7 @@ class Fingerprint(GenericFingerprint):
|
||||
|
||||
if not result:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.DERBY
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -89,6 +89,6 @@ class Fingerprint(GenericFingerprint):
|
||||
return True
|
||||
else:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.DERBY
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -11,74 +11,74 @@ from plugins.generic.enumeration import Enumeration as GenericEnumeration
|
||||
class Enumeration(GenericEnumeration):
|
||||
def getBanner(self):
|
||||
warnMsg = "on eXtremeDB it is not possible to get the banner"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return None
|
||||
|
||||
def getCurrentUser(self):
|
||||
warnMsg = "on eXtremeDB it is not possible to enumerate the current user"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def getCurrentDb(self):
|
||||
warnMsg = "on eXtremeDB it is not possible to get name of the current database"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def isDba(self, user=None):
|
||||
warnMsg = "on eXtremeDB it is not possible to test if current user is DBA"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def getUsers(self):
|
||||
warnMsg = "on eXtremeDB it is not possible to enumerate the users"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def getPasswordHashes(self):
|
||||
warnMsg = "on eXtremeDB it is not possible to enumerate the user password hashes"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def getPrivileges(self, *args, **kwargs):
|
||||
warnMsg = "on eXtremeDB it is not possible to enumerate the user privileges"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def getDbs(self):
|
||||
warnMsg = "on eXtremeDB it is not possible to enumerate databases (use only '--tables')"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def searchDb(self):
|
||||
warnMsg = "on eXtremeDB it is not possible to search databases"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def searchTable(self):
|
||||
warnMsg = "on eXtremeDB it is not possible to search tables"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def searchColumn(self):
|
||||
warnMsg = "on eXtremeDB it is not possible to search columns"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def search(self):
|
||||
warnMsg = "on eXtremeDB search option is not available"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def getHostname(self):
|
||||
warnMsg = "on eXtremeDB it is not possible to enumerate the hostname"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def getStatements(self):
|
||||
warnMsg = "on eXtremeDB it is not possible to enumerate the SQL statements"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
@@ -76,7 +76,7 @@ class Fingerprint(GenericFingerprint):
|
||||
|
||||
if not result:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.EXTREMEDB
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -85,7 +85,7 @@ class Fingerprint(GenericFingerprint):
|
||||
return True
|
||||
else:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.EXTREMEDB
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
|
||||
@@ -11,28 +11,28 @@ from plugins.generic.enumeration import Enumeration as GenericEnumeration
|
||||
class Enumeration(GenericEnumeration):
|
||||
def getDbs(self):
|
||||
warnMsg = "on Firebird it is not possible to enumerate databases (use only '--tables')"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def getPasswordHashes(self):
|
||||
warnMsg = "on Firebird it is not possible to enumerate the user password hashes"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def searchDb(self):
|
||||
warnMsg = "on Firebird it is not possible to search databases"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def getHostname(self):
|
||||
warnMsg = "on Firebird it is not possible to enumerate the hostname"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def getStatements(self):
|
||||
warnMsg = "on Firebird it is not possible to enumerate the SQL statements"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
@@ -126,7 +126,7 @@ class Fingerprint(GenericFingerprint):
|
||||
|
||||
if not result:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.FIREBIRD
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -146,7 +146,7 @@ class Fingerprint(GenericFingerprint):
|
||||
return True
|
||||
else:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.FIREBIRD
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
|
||||
@@ -11,22 +11,22 @@ from plugins.generic.enumeration import Enumeration as GenericEnumeration
|
||||
class Enumeration(GenericEnumeration):
|
||||
def getBanner(self):
|
||||
warnMsg = "on FrontBase it is not possible to get the banner"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return None
|
||||
|
||||
def getPrivileges(self, *args, **kwargs):
|
||||
warnMsg = "on FrontBase it is not possible to enumerate the user privileges"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def getHostname(self):
|
||||
warnMsg = "on FrontBase it is not possible to enumerate the hostname"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def getStatements(self):
|
||||
warnMsg = "on FrontBase it is not possible to enumerate the SQL statements"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
@@ -75,7 +75,7 @@ class Fingerprint(GenericFingerprint):
|
||||
|
||||
if not result:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.FRONTBASE
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -84,6 +84,6 @@ class Fingerprint(GenericFingerprint):
|
||||
return True
|
||||
else:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.FRONTBASE
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -31,25 +31,25 @@ class Enumeration(GenericEnumeration):
|
||||
|
||||
def getPrivileges(self, *args, **kwargs):
|
||||
warnMsg = "on H2 it is not possible to enumerate the user privileges"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def getHostname(self):
|
||||
warnMsg = "on H2 it is not possible to enumerate the hostname"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def getCurrentDb(self):
|
||||
return H2_DEFAULT_SCHEMA
|
||||
|
||||
def getPasswordHashes(self):
|
||||
warnMsg = "on H2 it is not possible to enumerate password hashes"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def getStatements(self):
|
||||
warnMsg = "on H2 it is not possible to enumerate the SQL statements"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
@@ -97,7 +97,7 @@ class Fingerprint(GenericFingerprint):
|
||||
|
||||
if not result:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.H2
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
else:
|
||||
@@ -108,10 +108,10 @@ class Fingerprint(GenericFingerprint):
|
||||
return True
|
||||
else:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.H2
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
def getHostname(self):
|
||||
warnMsg = "on H2 it is not possible to enumerate the hostname"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
@@ -31,19 +31,19 @@ class Enumeration(GenericEnumeration):
|
||||
|
||||
def getPrivileges(self, *args, **kwargs):
|
||||
warnMsg = "on HSQLDB it is not possible to enumerate the user privileges"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def getHostname(self):
|
||||
warnMsg = "on HSQLDB it is not possible to enumerate the hostname"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def getCurrentDb(self):
|
||||
return HSQLDB_DEFAULT_SCHEMA
|
||||
|
||||
def getStatements(self):
|
||||
warnMsg = "on HSQLDB it is not possible to enumerate the SQL statements"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
@@ -41,7 +41,7 @@ class Filesystem(GenericFilesystem):
|
||||
warnMsg += "to be written hexadecimal value is %d " % fcEncodedStrLen
|
||||
warnMsg += "bytes, this might cause errors in the file "
|
||||
warnMsg += "writing process"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
debugMsg = "exporting the %s file content to file '%s'" % (fileType, remoteFile)
|
||||
logger.debug(debugMsg)
|
||||
|
||||
@@ -103,14 +103,14 @@ class Fingerprint(GenericFingerprint):
|
||||
|
||||
if not result:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.HSQLDB
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
else:
|
||||
result = inject.checkBooleanExpression("ZERO() IS 0") # Note: check for H2 DBMS (sharing majority of same functions)
|
||||
if result:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.HSQLDB
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -134,7 +134,7 @@ class Fingerprint(GenericFingerprint):
|
||||
return True
|
||||
else:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.HSQLDB
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
dbgMsg = "...or version is < 1.7.2"
|
||||
logger.debug(dbgMsg)
|
||||
@@ -143,7 +143,7 @@ class Fingerprint(GenericFingerprint):
|
||||
|
||||
def getHostname(self):
|
||||
warnMsg = "on HSQLDB it is not possible to enumerate the hostname"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def checkDbmsOs(self, detailed=False):
|
||||
if Backend.getOs():
|
||||
|
||||
@@ -11,28 +11,28 @@ from plugins.generic.enumeration import Enumeration as GenericEnumeration
|
||||
class Enumeration(GenericEnumeration):
|
||||
def searchDb(self):
|
||||
warnMsg = "on Informix searching of databases is not implemented"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def searchTable(self):
|
||||
warnMsg = "on Informix searching of tables is not implemented"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def searchColumn(self):
|
||||
warnMsg = "on Informix searching of columns is not implemented"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def search(self):
|
||||
warnMsg = "on Informix search option is not available"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def getStatements(self):
|
||||
warnMsg = "on Informix it is not possible to enumerate the SQL statements"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
@@ -78,7 +78,7 @@ class Fingerprint(GenericFingerprint):
|
||||
|
||||
if not result:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.INFORMIX
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -106,6 +106,6 @@ class Fingerprint(GenericFingerprint):
|
||||
return True
|
||||
else:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.INFORMIX
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -37,7 +37,7 @@ class Enumeration(GenericEnumeration):
|
||||
|
||||
def getPasswordHashes(self):
|
||||
warnMsg = "on SAP MaxDB it is not possible to enumerate the user password hashes"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
@@ -108,7 +108,7 @@ class Enumeration(GenericEnumeration):
|
||||
warnMsg = "missing database parameter. sqlmap is going "
|
||||
warnMsg += "to use the current database to enumerate "
|
||||
warnMsg += "table(s) columns"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
conf.db = self.getCurrentDb()
|
||||
|
||||
@@ -226,20 +226,20 @@ class Enumeration(GenericEnumeration):
|
||||
|
||||
def getPrivileges(self, *args, **kwargs):
|
||||
warnMsg = "on SAP MaxDB it is not possible to enumerate the user privileges"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def search(self):
|
||||
warnMsg = "on SAP MaxDB search option is not available"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def getHostname(self):
|
||||
warnMsg = "on SAP MaxDB it is not possible to enumerate the hostname"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def getStatements(self):
|
||||
warnMsg = "on SAP MaxDB it is not possible to enumerate the SQL statements"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
@@ -34,7 +34,7 @@ class Fingerprint(GenericFingerprint):
|
||||
|
||||
if not result:
|
||||
warnMsg = "unable to perform %s version check" % DBMS.MAXDB
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return None
|
||||
|
||||
@@ -112,7 +112,7 @@ class Fingerprint(GenericFingerprint):
|
||||
|
||||
if not result:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.MAXDB
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -123,7 +123,7 @@ class Fingerprint(GenericFingerprint):
|
||||
return True
|
||||
else:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.MAXDB
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
|
||||
@@ -11,74 +11,74 @@ from plugins.generic.enumeration import Enumeration as GenericEnumeration
|
||||
class Enumeration(GenericEnumeration):
|
||||
def getBanner(self):
|
||||
warnMsg = "on Mckoi it is not possible to get the banner"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return None
|
||||
|
||||
def getCurrentUser(self):
|
||||
warnMsg = "on Mckoi it is not possible to enumerate the current user"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def getCurrentDb(self):
|
||||
warnMsg = "on Mckoi it is not possible to get name of the current database"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def isDba(self, user=None):
|
||||
warnMsg = "on Mckoi it is not possible to test if current user is DBA"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def getUsers(self):
|
||||
warnMsg = "on Mckoi it is not possible to enumerate the users"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def getPasswordHashes(self):
|
||||
warnMsg = "on Mckoi it is not possible to enumerate the user password hashes"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def getPrivileges(self, *args, **kwargs):
|
||||
warnMsg = "on Mckoi it is not possible to enumerate the user privileges"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def getDbs(self):
|
||||
warnMsg = "on Mckoi it is not possible to enumerate databases (use only '--tables')"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def searchDb(self):
|
||||
warnMsg = "on Mckoi it is not possible to search databases"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def searchTable(self):
|
||||
warnMsg = "on Mckoi it is not possible to search tables"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def searchColumn(self):
|
||||
warnMsg = "on Mckoi it is not possible to search columns"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def search(self):
|
||||
warnMsg = "on Mckoi search option is not available"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def getHostname(self):
|
||||
warnMsg = "on Mckoi it is not possible to enumerate the hostname"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def getStatements(self):
|
||||
warnMsg = "on Mckoi it is not possible to enumerate the SQL statements"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
@@ -76,7 +76,7 @@ class Fingerprint(GenericFingerprint):
|
||||
|
||||
if not result:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.MCKOI
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -85,7 +85,7 @@ class Fingerprint(GenericFingerprint):
|
||||
return True
|
||||
else:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.MCKOI
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
|
||||
@@ -11,22 +11,22 @@ from plugins.generic.enumeration import Enumeration as GenericEnumeration
|
||||
class Enumeration(GenericEnumeration):
|
||||
def getPasswordHashes(self):
|
||||
warnMsg = "on MimerSQL it is not possible to enumerate password hashes"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def getStatements(self):
|
||||
warnMsg = "on MimerSQL it is not possible to enumerate the SQL statements"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def getRoles(self, *args, **kwargs):
|
||||
warnMsg = "on MimerSQL it is not possible to enumerate the user roles"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def getHostname(self):
|
||||
warnMsg = "on MimerSQL it is not possible to enumerate the hostname"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
@@ -78,7 +78,7 @@ class Fingerprint(GenericFingerprint):
|
||||
|
||||
if not result:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.MIMERSQL
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -89,6 +89,6 @@ class Fingerprint(GenericFingerprint):
|
||||
return True
|
||||
else:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.MIMERSQL
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -11,28 +11,28 @@ from plugins.generic.enumeration import Enumeration as GenericEnumeration
|
||||
class Enumeration(GenericEnumeration):
|
||||
def getPasswordHashes(self):
|
||||
warnMsg = "on MonetDB it is not possible to enumerate password hashes"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def getStatements(self):
|
||||
warnMsg = "on MonetDB it is not possible to enumerate the SQL statements"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def getPrivileges(self, *args, **kwargs):
|
||||
warnMsg = "on MonetDB it is not possible to enumerate the user privileges"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def getRoles(self, *args, **kwargs):
|
||||
warnMsg = "on MonetDB it is not possible to enumerate the user roles"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def getHostname(self):
|
||||
warnMsg = "on MonetDB it is not possible to enumerate the hostname"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
@@ -78,7 +78,7 @@ class Fingerprint(GenericFingerprint):
|
||||
|
||||
if not result:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.MONETDB
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -89,6 +89,6 @@ class Fingerprint(GenericFingerprint):
|
||||
return True
|
||||
else:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.MONETDB
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -39,7 +39,7 @@ class Enumeration(GenericEnumeration):
|
||||
warnMsg = "on Microsoft SQL Server it is not possible to fetch "
|
||||
warnMsg += "database users privileges, sqlmap will check whether "
|
||||
warnMsg += "or not the database users are database administrators"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
users = []
|
||||
areAdmins = set()
|
||||
@@ -140,7 +140,7 @@ class Enumeration(GenericEnumeration):
|
||||
if count != 0:
|
||||
warnMsg = "unable to retrieve the number of "
|
||||
warnMsg += "tables for database '%s'" % db
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
continue
|
||||
|
||||
tables = []
|
||||
@@ -159,7 +159,7 @@ class Enumeration(GenericEnumeration):
|
||||
else:
|
||||
warnMsg = "unable to retrieve the tables "
|
||||
warnMsg += "for database '%s'" % db
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
if not kb.data.cachedTables and not conf.search:
|
||||
errMsg = "unable to retrieve the tables for any database"
|
||||
@@ -248,7 +248,7 @@ class Enumeration(GenericEnumeration):
|
||||
warnMsg += "s LIKE"
|
||||
warnMsg += " '%s' " % unsafeSQLIdentificatorNaming(tbl)
|
||||
warnMsg += "in database '%s'" % unsafeSQLIdentificatorNaming(db)
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
continue
|
||||
|
||||
@@ -269,7 +269,7 @@ class Enumeration(GenericEnumeration):
|
||||
|
||||
if not foundTbls:
|
||||
warnMsg = "no databases contain any of the provided tables"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
return
|
||||
|
||||
conf.dumper.dbTables(foundTbls)
|
||||
@@ -407,7 +407,7 @@ class Enumeration(GenericEnumeration):
|
||||
warnMsg += "s LIKE"
|
||||
warnMsg += " '%s' " % column
|
||||
warnMsg += "in database '%s'" % db
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
continue
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ class Fingerprint(GenericFingerprint):
|
||||
return True
|
||||
else:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.MSSQL
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -172,7 +172,7 @@ class Fingerprint(GenericFingerprint):
|
||||
warnMsg = "unable to fingerprint the underlying operating "
|
||||
warnMsg += "system version, assuming it is Windows "
|
||||
warnMsg += "%s Service Pack %d" % (Backend.getOsVersion(), Backend.getOsServicePack())
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
self.cleanup(onlyFileTbl=True)
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ class Filesystem(GenericFilesystem):
|
||||
if conf.direct or isTechniqueAvailable(PAYLOAD.TECHNIQUE.UNION):
|
||||
if not kb.bruteMode:
|
||||
warnMsg += ", going to fall-back to simpler UNION technique"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
result = self.nonStackedReadFile(remoteFile)
|
||||
else:
|
||||
raise SqlmapNoneDataException(warnMsg)
|
||||
@@ -100,7 +100,7 @@ class Filesystem(GenericFilesystem):
|
||||
warnMsg += "to be written hexadecimal value is %d " % fcEncodedStrLen
|
||||
warnMsg += "bytes, this might cause errors in the file "
|
||||
warnMsg += "writing process"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
debugMsg = "exporting the %s file content to file '%s'" % (fileType, remoteFile)
|
||||
logger.debug(debugMsg)
|
||||
@@ -129,7 +129,7 @@ class Filesystem(GenericFilesystem):
|
||||
warnMsg += "to be written hexadecimal value is %d " % fcEncodedStrLen
|
||||
warnMsg += "bytes, this might cause errors in the file "
|
||||
warnMsg += "writing process"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
debugMsg = "exporting the %s file content to file '%s'" % (fileType, remoteFile)
|
||||
logger.debug(debugMsg)
|
||||
|
||||
@@ -37,7 +37,7 @@ class Fingerprint(GenericFingerprint):
|
||||
|
||||
if not result:
|
||||
warnMsg = "unable to perform %s comment injection" % DBMS.MYSQL
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return None
|
||||
|
||||
@@ -192,7 +192,7 @@ class Fingerprint(GenericFingerprint):
|
||||
|
||||
if not result:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.MYSQL
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -297,7 +297,7 @@ class Fingerprint(GenericFingerprint):
|
||||
return True
|
||||
else:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.MYSQL
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ class Enumeration(GenericEnumeration):
|
||||
|
||||
warnMsg = "unable to retrieve the number of "
|
||||
warnMsg += "roles for user '%s'" % user
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
continue
|
||||
|
||||
infoMsg = "fetching roles for user '%s'" % user
|
||||
@@ -149,7 +149,7 @@ class Enumeration(GenericEnumeration):
|
||||
else:
|
||||
warnMsg = "unable to retrieve the roles "
|
||||
warnMsg += "for user '%s'" % user
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
retrievedUsers.add(user)
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ class Fingerprint(GenericFingerprint):
|
||||
|
||||
if not result:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.ORACLE
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -116,7 +116,7 @@ class Fingerprint(GenericFingerprint):
|
||||
return True
|
||||
else:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.ORACLE
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ class Connector(GenericConnector):
|
||||
try:
|
||||
return self.cursor.fetchall()
|
||||
except psycopg2.ProgrammingError as ex:
|
||||
logger.warn(getSafeExString(ex))
|
||||
logger.warning(getSafeExString(ex))
|
||||
return None
|
||||
|
||||
def execute(self, query):
|
||||
@@ -56,7 +56,7 @@ class Connector(GenericConnector):
|
||||
self.cursor.execute(query)
|
||||
retVal = True
|
||||
except (psycopg2.OperationalError, psycopg2.ProgrammingError) as ex:
|
||||
logger.warn(("(remote) '%s'" % getSafeExString(ex)).strip())
|
||||
logger.warning(("(remote) '%s'" % getSafeExString(ex)).strip())
|
||||
except psycopg2.InternalError as ex:
|
||||
raise SqlmapConnectionException(getSafeExString(ex))
|
||||
|
||||
|
||||
@@ -12,4 +12,4 @@ from plugins.generic.enumeration import Enumeration as GenericEnumeration
|
||||
class Enumeration(GenericEnumeration):
|
||||
def getHostname(self):
|
||||
warnMsg = "on PostgreSQL it is not possible to enumerate the hostname"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
@@ -117,7 +117,7 @@ class Fingerprint(GenericFingerprint):
|
||||
|
||||
if not result:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.PGSQL
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -187,7 +187,7 @@ class Fingerprint(GenericFingerprint):
|
||||
return True
|
||||
else:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.PGSQL
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
|
||||
@@ -11,48 +11,48 @@ from plugins.generic.enumeration import Enumeration as GenericEnumeration
|
||||
class Enumeration(GenericEnumeration):
|
||||
def getBanner(self):
|
||||
warnMsg = "on Presto it is not possible to get the banner"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return None
|
||||
|
||||
def getCurrentDb(self):
|
||||
warnMsg = "on Presto it is not possible to get name of the current database (schema)"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def isDba(self, user=None):
|
||||
warnMsg = "on Presto it is not possible to test if current user is DBA"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def getUsers(self):
|
||||
warnMsg = "on Presto it is not possible to enumerate the users"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def getPasswordHashes(self):
|
||||
warnMsg = "on Presto it is not possible to enumerate the user password hashes"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def getPrivileges(self, *args, **kwargs):
|
||||
warnMsg = "on Presto it is not possible to enumerate the user privileges"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def getRoles(self, *args, **kwargs):
|
||||
warnMsg = "on Presto it is not possible to enumerate the user roles"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def getHostname(self):
|
||||
warnMsg = "on Presto it is not possible to enumerate the hostname"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def getStatements(self):
|
||||
warnMsg = "on Presto it is not possible to enumerate the SQL statements"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
@@ -78,7 +78,7 @@ class Fingerprint(GenericFingerprint):
|
||||
|
||||
if not result:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.PRESTO
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -132,6 +132,6 @@ class Fingerprint(GenericFingerprint):
|
||||
return True
|
||||
else:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.PRESTO
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -11,74 +11,74 @@ from plugins.generic.enumeration import Enumeration as GenericEnumeration
|
||||
class Enumeration(GenericEnumeration):
|
||||
def getBanner(self):
|
||||
warnMsg = "on Raima Database Manager it is not possible to get the banner"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return None
|
||||
|
||||
def getCurrentUser(self):
|
||||
warnMsg = "on Raima Database Manager it is not possible to enumerate the current user"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def getCurrentDb(self):
|
||||
warnMsg = "on Raima Database Manager it is not possible to get name of the current database"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def isDba(self, user=None):
|
||||
warnMsg = "on Raima Database Manager it is not possible to test if current user is DBA"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def getUsers(self):
|
||||
warnMsg = "on Raima Database Manager it is not possible to enumerate the users"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def getPasswordHashes(self):
|
||||
warnMsg = "on Raima Database Manager it is not possible to enumerate the user password hashes"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def getPrivileges(self, *args, **kwargs):
|
||||
warnMsg = "on Raima Database Manager it is not possible to enumerate the user privileges"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def getDbs(self):
|
||||
warnMsg = "on Raima Database Manager it is not possible to enumerate databases (use only '--tables')"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def searchDb(self):
|
||||
warnMsg = "on Raima Database Manager it is not possible to search databases"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def searchTable(self):
|
||||
warnMsg = "on Raima Database Manager it is not possible to search tables"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def searchColumn(self):
|
||||
warnMsg = "on Raima Database Manager it is not possible to search columns"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def search(self):
|
||||
warnMsg = "on Raima Database Manager search option is not available"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def getHostname(self):
|
||||
warnMsg = "on Raima Database Manager it is not possible to enumerate the hostname"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def getStatements(self):
|
||||
warnMsg = "on Raima Database Manager it is not possible to enumerate the SQL statements"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
@@ -76,7 +76,7 @@ class Fingerprint(GenericFingerprint):
|
||||
|
||||
if not result:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.RAIMA
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -85,7 +85,7 @@ class Fingerprint(GenericFingerprint):
|
||||
return True
|
||||
else:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.RAIMA
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ class Enumeration(GenericEnumeration):
|
||||
warnMsg = "on Sybase it is not possible to fetch "
|
||||
warnMsg += "database users privileges, sqlmap will check whether "
|
||||
warnMsg += "or not the database users are database administrators"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
users = []
|
||||
areAdmins = set()
|
||||
@@ -169,7 +169,7 @@ class Enumeration(GenericEnumeration):
|
||||
warnMsg = "missing database parameter. sqlmap is going "
|
||||
warnMsg += "to use the current database to enumerate "
|
||||
warnMsg += "table(s) columns"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
conf.db = self.getCurrentDb()
|
||||
|
||||
@@ -295,32 +295,32 @@ class Enumeration(GenericEnumeration):
|
||||
|
||||
def searchDb(self):
|
||||
warnMsg = "on Sybase searching of databases is not implemented"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def searchTable(self):
|
||||
warnMsg = "on Sybase searching of tables is not implemented"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def searchColumn(self):
|
||||
warnMsg = "on Sybase searching of columns is not implemented"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def search(self):
|
||||
warnMsg = "on Sybase search option is not available"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def getHostname(self):
|
||||
warnMsg = "on Sybase it is not possible to enumerate the hostname"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def getStatements(self):
|
||||
warnMsg = "on Sybase 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.SYBASE
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -115,6 +115,6 @@ class Fingerprint(GenericFingerprint):
|
||||
return True
|
||||
else:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.SYBASE
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -11,6 +11,6 @@ from plugins.generic.enumeration import Enumeration as GenericEnumeration
|
||||
class Enumeration(GenericEnumeration):
|
||||
def getRoles(self, *args, **kwargs):
|
||||
warnMsg = "on Vertica it is not possible to enumerate the user roles"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
@@ -79,7 +79,7 @@ class Fingerprint(GenericFingerprint):
|
||||
|
||||
if not result:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.VERTICA
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -101,6 +101,6 @@ class Fingerprint(GenericFingerprint):
|
||||
return True
|
||||
else:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.VERTICA
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -11,46 +11,46 @@ from plugins.generic.enumeration import Enumeration as GenericEnumeration
|
||||
class Enumeration(GenericEnumeration):
|
||||
def getPasswordHashes(self):
|
||||
warnMsg = "on Virtuoso it is not possible to enumerate the user password hashes"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def getPrivileges(self, *args, **kwargs):
|
||||
warnMsg = "on Virtuoso it is not possible to enumerate the user privileges"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def getRoles(self, *args, **kwargs):
|
||||
warnMsg = "on Virtuoso it is not possible to enumerate the user roles"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return {}
|
||||
|
||||
def searchDb(self):
|
||||
warnMsg = "on Virtuoso it is not possible to search databases"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def searchTable(self):
|
||||
warnMsg = "on Virtuoso it is not possible to search tables"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def searchColumn(self):
|
||||
warnMsg = "on Virtuoso it is not possible to search columns"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
def search(self):
|
||||
warnMsg = "on Virtuoso search option is not available"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def getStatements(self):
|
||||
warnMsg = "on Virtuoso it is not possible to enumerate the SQL statements"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return []
|
||||
|
||||
@@ -75,7 +75,7 @@ class Fingerprint(GenericFingerprint):
|
||||
|
||||
if not result:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.VIRTUOSO
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -84,6 +84,6 @@ class Fingerprint(GenericFingerprint):
|
||||
return True
|
||||
else:
|
||||
warnMsg = "the back-end DBMS is not %s" % DBMS.VIRTUOSO
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return False
|
||||
|
||||
@@ -65,7 +65,7 @@ class Custom(object):
|
||||
elif not isStackingAvailable() and not conf.direct:
|
||||
warnMsg = "execution of non-query SQL statements is only "
|
||||
warnMsg += "available when stacked queries are supported"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return None
|
||||
else:
|
||||
@@ -80,7 +80,7 @@ class Custom(object):
|
||||
output = NULL
|
||||
|
||||
except SqlmapNoneDataException as ex:
|
||||
logger.warn(ex)
|
||||
logger.warning(ex)
|
||||
|
||||
return output
|
||||
|
||||
|
||||
@@ -106,13 +106,13 @@ class Databases(object):
|
||||
warnMsg = "information_schema not available, "
|
||||
warnMsg += "back-end DBMS is MySQL < 5. database "
|
||||
warnMsg += "names will be fetched from 'mysql' database"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
elif Backend.getIdentifiedDbms() in (DBMS.ORACLE, DBMS.DB2, DBMS.PGSQL, DBMS.MONETDB, DBMS.DERBY, DBMS.VERTICA, DBMS.PRESTO, DBMS.MIMERSQL, DBMS.CRATEDB, DBMS.CACHE, DBMS.FRONTBASE):
|
||||
warnMsg = "schema names are going to be used on %s " % Backend.getIdentifiedDbms()
|
||||
warnMsg += "for enumeration as the counterpart to database "
|
||||
warnMsg += "names on other DBMSes"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
infoMsg = "fetching database (schema) names"
|
||||
|
||||
@@ -120,7 +120,7 @@ class Databases(object):
|
||||
warnMsg = "user names are going to be used on %s " % Backend.getIdentifiedDbms()
|
||||
warnMsg += "for enumeration as the counterpart to database "
|
||||
warnMsg += "names on other DBMSes"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
infoMsg = "fetching database (user) names"
|
||||
|
||||
@@ -220,7 +220,7 @@ class Databases(object):
|
||||
if Backend.isDbms(DBMS.MYSQL) and not kb.data.has_information_schema:
|
||||
warnMsg = "information_schema not available, "
|
||||
warnMsg += "back-end DBMS is MySQL < 5.0"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
bruteForce = True
|
||||
|
||||
elif Backend.getIdentifiedDbms() in (DBMS.MCKOI, DBMS.EXTREMEDB, DBMS.RAIMA):
|
||||
@@ -235,7 +235,7 @@ class Databases(object):
|
||||
if not tables:
|
||||
warnMsg = "cannot retrieve table names, "
|
||||
warnMsg += "back-end DBMS is %s" % Backend.getIdentifiedDbms()
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
bruteForce = True
|
||||
else:
|
||||
return tables
|
||||
@@ -381,7 +381,7 @@ class Databases(object):
|
||||
if count == 0:
|
||||
warnMsg = "database '%s' " % unsafeSQLIdentificatorNaming(db)
|
||||
warnMsg += "appears to be empty"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
break
|
||||
|
||||
elif not isNumPosStrValue(count):
|
||||
@@ -441,7 +441,7 @@ class Databases(object):
|
||||
else:
|
||||
warnMsg = "unable to retrieve the table names "
|
||||
warnMsg += "for database '%s'" % unsafeSQLIdentificatorNaming(db)
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
if isNoneValue(kb.data.cachedTables):
|
||||
kb.data.cachedTables.clear()
|
||||
@@ -471,7 +471,7 @@ class Databases(object):
|
||||
warnMsg = "missing database parameter. sqlmap is going "
|
||||
warnMsg += "to use the current database to enumerate "
|
||||
warnMsg += "table(s) columns"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
conf.db = self.getCurrentDb()
|
||||
|
||||
@@ -542,7 +542,7 @@ class Databases(object):
|
||||
if Backend.isDbms(DBMS.MYSQL) and not kb.data.has_information_schema:
|
||||
warnMsg = "information_schema not available, "
|
||||
warnMsg += "back-end DBMS is MySQL < 5.0"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
bruteForce = True
|
||||
|
||||
elif Backend.getIdentifiedDbms() in (DBMS.ACCESS, DBMS.MCKOI, DBMS.EXTREMEDB, DBMS.RAIMA):
|
||||
@@ -925,7 +925,7 @@ class Databases(object):
|
||||
warnMsg += ("table '%s' " % unsafeSQLIdentificatorNaming(unArrayizeValue(tblList))) if len(tblList) == 1 else "any table "
|
||||
if METADB_SUFFIX not in conf.db:
|
||||
warnMsg += "in database '%s'" % unsafeSQLIdentificatorNaming(conf.db)
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
if bruteForce is None:
|
||||
return self.getColumns(onlyColNames=onlyColNames, colTuple=colTuple, bruteForce=True)
|
||||
@@ -994,7 +994,7 @@ class Databases(object):
|
||||
warnMsg = "missing table parameter, sqlmap will retrieve "
|
||||
warnMsg += "the number of entries for all database "
|
||||
warnMsg += "management system databases' tables"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
elif "." in conf.tbl:
|
||||
if not conf.db:
|
||||
@@ -1004,7 +1004,7 @@ class Databases(object):
|
||||
warnMsg = "missing database parameter. sqlmap is going to "
|
||||
warnMsg += "use the current database to retrieve the "
|
||||
warnMsg += "number of entries for table '%s'" % unsafeSQLIdentificatorNaming(conf.tbl)
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
conf.db = self.getCurrentDb()
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ class Entries(object):
|
||||
warnMsg = "missing database parameter. sqlmap is going "
|
||||
warnMsg += "to use the current database to enumerate "
|
||||
warnMsg += "table(s) entries"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
conf.db = self.getCurrentDb()
|
||||
|
||||
@@ -142,7 +142,7 @@ class Entries(object):
|
||||
if METADB_SUFFIX not in conf.db:
|
||||
warnMsg += " in database '%s'" % unsafeSQLIdentificatorNaming(conf.db)
|
||||
warnMsg += ", skipping" if len(tblList) > 1 else ""
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
continue
|
||||
|
||||
@@ -157,7 +157,7 @@ class Entries(object):
|
||||
if METADB_SUFFIX not in conf.db:
|
||||
warnMsg += " in database '%s'" % unsafeSQLIdentificatorNaming(conf.db)
|
||||
warnMsg += " (no usable column names)"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
continue
|
||||
|
||||
kb.dumpColumns = [unsafeSQLIdentificatorNaming(_) for _ in colList]
|
||||
@@ -222,7 +222,7 @@ class Entries(object):
|
||||
kb.dumpKeyboardInterrupt = True
|
||||
clearConsoleLine()
|
||||
warnMsg = "Ctrl+C detected in dumping phase"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
if isNoneValue(entries) and not kb.dumpKeyboardInterrupt:
|
||||
try:
|
||||
@@ -232,7 +232,7 @@ class Entries(object):
|
||||
kb.dumpKeyboardInterrupt = True
|
||||
clearConsoleLine()
|
||||
warnMsg = "Ctrl+C detected in dumping phase"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
if retVal:
|
||||
entries, _ = retVal
|
||||
@@ -254,7 +254,7 @@ class Entries(object):
|
||||
kb.dumpKeyboardInterrupt = True
|
||||
clearConsoleLine()
|
||||
warnMsg = "Ctrl+C detected in dumping phase"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
if not isNoneValue(entries):
|
||||
if isinstance(entries, six.string_types):
|
||||
@@ -314,7 +314,7 @@ class Entries(object):
|
||||
warnMsg = "table '%s' " % unsafeSQLIdentificatorNaming(tbl)
|
||||
warnMsg += "in database '%s' " % unsafeSQLIdentificatorNaming(conf.db)
|
||||
warnMsg += "appears to be empty"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
for column in colList:
|
||||
lengths[column] = len(column)
|
||||
@@ -326,7 +326,7 @@ class Entries(object):
|
||||
warnMsg += "column(s) '%s' " % colNames
|
||||
warnMsg += "entries for table '%s' " % unsafeSQLIdentificatorNaming(tbl)
|
||||
warnMsg += "in database '%s'" % unsafeSQLIdentificatorNaming(conf.db)
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
continue
|
||||
|
||||
@@ -366,7 +366,7 @@ class Entries(object):
|
||||
kb.dumpKeyboardInterrupt = True
|
||||
clearConsoleLine()
|
||||
warnMsg = "Ctrl+C detected in dumping phase"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
if not entries and not kb.dumpKeyboardInterrupt:
|
||||
try:
|
||||
@@ -376,7 +376,7 @@ class Entries(object):
|
||||
kb.dumpKeyboardInterrupt = True
|
||||
clearConsoleLine()
|
||||
warnMsg = "Ctrl+C detected in dumping phase"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
if retVal:
|
||||
entries, lengths = retVal
|
||||
@@ -437,7 +437,7 @@ class Entries(object):
|
||||
kb.dumpKeyboardInterrupt = True
|
||||
clearConsoleLine()
|
||||
warnMsg = "Ctrl+C detected in dumping phase"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
for column, columnEntries in entries.items():
|
||||
length = max(lengths[column], len(column))
|
||||
@@ -452,7 +452,7 @@ class Entries(object):
|
||||
warnMsg += "of columns '%s' " % colNames
|
||||
warnMsg += "for table '%s' " % unsafeSQLIdentificatorNaming(tbl)
|
||||
warnMsg += "in database '%s'%s" % (unsafeSQLIdentificatorNaming(conf.db), " (permission denied)" if kb.permissionFlag else "")
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
else:
|
||||
kb.data.dumpedTable["__infos__"] = {"count": entriesCount,
|
||||
"table": safeSQLIdentificatorNaming(tbl, True),
|
||||
|
||||
@@ -62,7 +62,7 @@ class Filesystem(object):
|
||||
localFileSize = os.path.getsize(localFile)
|
||||
except OSError:
|
||||
warnMsg = "file '%s' is missing" % localFile
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
localFileSize = 0
|
||||
|
||||
if fileRead and Backend.isDbms(DBMS.PGSQL):
|
||||
@@ -95,7 +95,7 @@ class Filesystem(object):
|
||||
warnMsg = "it looks like the file has not been written (usually "
|
||||
warnMsg += "occurs if the DBMS process user has no write "
|
||||
warnMsg += "privileges in the destination path)"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return sameFile
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ class Fingerprint(object):
|
||||
def userChooseDbmsOs(self):
|
||||
warnMsg = "for some reason sqlmap was unable to fingerprint "
|
||||
warnMsg += "the back-end DBMS operating system"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
msg = "do you want to provide the OS? [(W)indows/(l)inux]"
|
||||
|
||||
@@ -55,4 +55,4 @@ class Fingerprint(object):
|
||||
break
|
||||
else:
|
||||
warnMsg = "invalid value"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
@@ -183,7 +183,7 @@ class Miscellaneous(object):
|
||||
|
||||
warnMsg += "saved on the file system can only be deleted "
|
||||
warnMsg += "manually"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def likeOrExact(self, what):
|
||||
message = "do you want sqlmap to consider provided %s(s):\n" % what
|
||||
|
||||
@@ -119,7 +119,7 @@ class Search(object):
|
||||
if dbConsider == "1":
|
||||
warnMsg += "s LIKE"
|
||||
warnMsg += " '%s' found" % unsafeSQLIdentificatorNaming(db)
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
continue
|
||||
|
||||
@@ -249,7 +249,7 @@ class Search(object):
|
||||
if tblConsider == "1":
|
||||
warnMsg += "s LIKE"
|
||||
warnMsg += " '%s'" % unsafeSQLIdentificatorNaming(tbl)
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
continue
|
||||
|
||||
@@ -302,7 +302,7 @@ class Search(object):
|
||||
warnMsg += "s LIKE"
|
||||
warnMsg += " '%s' " % unsafeSQLIdentificatorNaming(tbl)
|
||||
warnMsg += "in database '%s'" % unsafeSQLIdentificatorNaming(db)
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
continue
|
||||
|
||||
@@ -339,7 +339,7 @@ class Search(object):
|
||||
|
||||
if not foundTbls:
|
||||
warnMsg = "no databases contain any of the provided tables"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
return
|
||||
|
||||
conf.dumper.dbTables(foundTbls)
|
||||
@@ -507,7 +507,7 @@ class Search(object):
|
||||
if colConsider == "1":
|
||||
warnMsg += "s LIKE"
|
||||
warnMsg += " '%s'" % unsafeSQLIdentificatorNaming(column)
|
||||
logger.warn("%s%s" % (warnMsg, infoMsgTbl))
|
||||
logger.warning("%s%s" % (warnMsg, infoMsgTbl))
|
||||
|
||||
continue
|
||||
|
||||
@@ -566,7 +566,7 @@ class Search(object):
|
||||
warnMsg += "s LIKE"
|
||||
warnMsg += " '%s' " % unsafeSQLIdentificatorNaming(column)
|
||||
warnMsg += "in database '%s'" % unsafeSQLIdentificatorNaming(db)
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
continue
|
||||
|
||||
@@ -620,7 +620,7 @@ class Search(object):
|
||||
else:
|
||||
warnMsg = "no databases have tables containing any of the "
|
||||
warnMsg += "provided columns"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
def search(self):
|
||||
if Backend.getIdentifiedDbms() in UPPER_CASE_DBMSES:
|
||||
|
||||
@@ -122,7 +122,7 @@ class Takeover(Abstraction, Metasploit, ICMPsh, Registry):
|
||||
|
||||
else:
|
||||
warnMsg = "invalid value, valid values are '1' and '2'"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
else:
|
||||
tunnel = 1
|
||||
|
||||
@@ -193,7 +193,7 @@ class Takeover(Abstraction, Metasploit, ICMPsh, Registry):
|
||||
|
||||
else:
|
||||
warnMsg = "invalid value, valid values are '1' and '2'"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
if choice == 1:
|
||||
goUdf = True
|
||||
@@ -251,7 +251,7 @@ class Takeover(Abstraction, Metasploit, ICMPsh, Registry):
|
||||
warnMsg = "sqlmap does not implement any operating system "
|
||||
warnMsg += "user privilege escalation technique when the "
|
||||
warnMsg += "back-end DBMS underlying system is not Windows"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
if tunnel == 1:
|
||||
self.createMsfShellcode(exitfunc="process", format="raw", extra="BufferRegister=EAX", encode="x86/alpha_mixed")
|
||||
@@ -326,7 +326,7 @@ class Takeover(Abstraction, Metasploit, ICMPsh, Registry):
|
||||
printWarn = False
|
||||
|
||||
if printWarn:
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
self.smb()
|
||||
|
||||
|
||||
@@ -301,7 +301,7 @@ class Users(object):
|
||||
if not isNumPosStrValue(count):
|
||||
warnMsg = "unable to retrieve the number of password "
|
||||
warnMsg += "hashes for user '%s'" % user
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
continue
|
||||
|
||||
infoMsg = "fetching password hashes for user '%s'" % user
|
||||
@@ -345,7 +345,7 @@ class Users(object):
|
||||
else:
|
||||
warnMsg = "unable to retrieve the password "
|
||||
warnMsg += "hashes for user '%s'" % user
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
retrievedUsers.add(user)
|
||||
|
||||
@@ -547,7 +547,7 @@ class Users(object):
|
||||
|
||||
warnMsg = "unable to retrieve the number of "
|
||||
warnMsg += "privileges for user '%s'" % outuser
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
continue
|
||||
|
||||
infoMsg = "fetching privileges for user '%s'" % outuser
|
||||
@@ -650,7 +650,7 @@ class Users(object):
|
||||
else:
|
||||
warnMsg = "unable to retrieve the privileges "
|
||||
warnMsg += "for user '%s'" % outuser
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
retrievedUsers.add(user)
|
||||
|
||||
@@ -668,6 +668,6 @@ class Users(object):
|
||||
def getRoles(self, query2=False):
|
||||
warnMsg = "on %s the concept of roles does not " % Backend.getIdentifiedDbms()
|
||||
warnMsg += "exist. sqlmap will enumerate privileges instead"
|
||||
logger.warn(warnMsg)
|
||||
logger.warning(warnMsg)
|
||||
|
||||
return self.getPrivileges(query2)
|
||||
|
||||
Reference in New Issue
Block a user