mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 05:01:30 +00:00
Doing some more style updating (capitalization of exception classes; using _ is enough for private members - __ is used in Python specific methods)
This commit is contained in:
@@ -15,8 +15,8 @@ import logging
|
||||
from lib.core.convert import utf8encode
|
||||
from lib.core.data import conf
|
||||
from lib.core.data import logger
|
||||
from lib.core.exception import sqlmapConnectionException
|
||||
from lib.core.exception import sqlmapMissingDependence
|
||||
from lib.core.exception import SqlmapConnectionException
|
||||
from lib.core.exception import SqlmapMissingDependence
|
||||
from plugins.generic.connector import Connector as GenericConnector
|
||||
|
||||
|
||||
@@ -56,12 +56,12 @@ class Connector(GenericConnector):
|
||||
except ImportError:
|
||||
errMsg = "sqlmap requires 'python-sqlite2' third-party library "
|
||||
errMsg += "in order to directly connect to the database '%s'" % self.db
|
||||
raise sqlmapMissingDependence, errMsg
|
||||
raise SqlmapMissingDependence, errMsg
|
||||
|
||||
self.__sqlite = sqlite
|
||||
self.connector = self.__sqlite.connect(database=self.db, check_same_thread=False, timeout=conf.timeout)
|
||||
except (self.__sqlite.DatabaseError, self.__sqlite.OperationalError), msg:
|
||||
raise sqlmapConnectionException, msg[0]
|
||||
raise SqlmapConnectionException, msg[0]
|
||||
|
||||
self.setCursor()
|
||||
self.connected()
|
||||
@@ -79,7 +79,7 @@ class Connector(GenericConnector):
|
||||
except self.__sqlite.OperationalError, msg:
|
||||
logger.log(logging.WARN if conf.dbmsHandler else logging.DEBUG, "(remote) %s" % msg[0])
|
||||
except self.__sqlite.DatabaseError, msg:
|
||||
raise sqlmapConnectionException, msg[0]
|
||||
raise SqlmapConnectionException, msg[0]
|
||||
|
||||
self.connector.commit()
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ See the file 'doc/COPYING' for copying permission
|
||||
"""
|
||||
|
||||
from lib.core.data import logger
|
||||
from lib.core.exception import sqlmapUnsupportedFeatureException
|
||||
from lib.core.exception import SqlmapUnsupportedFeatureException
|
||||
from plugins.generic.enumeration import Enumeration as GenericEnumeration
|
||||
|
||||
class Enumeration(GenericEnumeration):
|
||||
@@ -57,7 +57,7 @@ class Enumeration(GenericEnumeration):
|
||||
|
||||
def searchColumn(self):
|
||||
errMsg = "on SQLite you must specify the table and columns to dump"
|
||||
raise sqlmapUnsupportedFeatureException, errMsg
|
||||
raise SqlmapUnsupportedFeatureException, errMsg
|
||||
|
||||
def getHostname(self):
|
||||
warnMsg = "on SQLite it is not possible to enumerate the hostname"
|
||||
|
||||
@@ -5,7 +5,7 @@ Copyright (c) 2006-2012 sqlmap developers (http://sqlmap.org/)
|
||||
See the file 'doc/COPYING' for copying permission
|
||||
"""
|
||||
|
||||
from lib.core.exception import sqlmapUnsupportedFeatureException
|
||||
from lib.core.exception import SqlmapUnsupportedFeatureException
|
||||
from plugins.generic.filesystem import Filesystem as GenericFilesystem
|
||||
|
||||
class Filesystem(GenericFilesystem):
|
||||
@@ -14,8 +14,8 @@ class Filesystem(GenericFilesystem):
|
||||
|
||||
def readFile(self, rFile):
|
||||
errMsg = "on SQLite it is not possible to read files"
|
||||
raise sqlmapUnsupportedFeatureException, errMsg
|
||||
raise SqlmapUnsupportedFeatureException, errMsg
|
||||
|
||||
def writeFile(self, wFile, dFile, fileType=None):
|
||||
errMsg = "on SQLite it is not possible to write files"
|
||||
raise sqlmapUnsupportedFeatureException, errMsg
|
||||
raise SqlmapUnsupportedFeatureException, errMsg
|
||||
|
||||
@@ -9,7 +9,7 @@ import binascii
|
||||
import re
|
||||
|
||||
from lib.core.common import isDBMSVersionAtLeast
|
||||
from lib.core.exception import sqlmapSyntaxException
|
||||
from lib.core.exception import SqlmapSyntaxException
|
||||
from plugins.generic.syntax import Syntax as GenericSyntax
|
||||
|
||||
class Syntax(GenericSyntax):
|
||||
@@ -42,7 +42,7 @@ class Syntax(GenericSyntax):
|
||||
index = expression[firstIndex+2:].find("'")
|
||||
|
||||
if index == -1:
|
||||
raise sqlmapSyntaxException, "Unenclosed ' in '%s'" % expression
|
||||
raise SqlmapSyntaxException, "Unenclosed ' in '%s'" % expression
|
||||
|
||||
lastIndex = firstIndex + index + 3
|
||||
old = expression[firstIndex:lastIndex]
|
||||
|
||||
@@ -5,7 +5,7 @@ Copyright (c) 2006-2012 sqlmap developers (http://sqlmap.org/)
|
||||
See the file 'doc/COPYING' for copying permission
|
||||
"""
|
||||
|
||||
from lib.core.exception import sqlmapUnsupportedFeatureException
|
||||
from lib.core.exception import SqlmapUnsupportedFeatureException
|
||||
from plugins.generic.takeover import Takeover as GenericTakeover
|
||||
|
||||
class Takeover(GenericTakeover):
|
||||
@@ -14,18 +14,18 @@ class Takeover(GenericTakeover):
|
||||
|
||||
def osCmd(self):
|
||||
errMsg = "on SQLite it is not possible to execute commands"
|
||||
raise sqlmapUnsupportedFeatureException, errMsg
|
||||
raise SqlmapUnsupportedFeatureException, errMsg
|
||||
|
||||
def osShell(self):
|
||||
errMsg = "on SQLite it is not possible to execute commands"
|
||||
raise sqlmapUnsupportedFeatureException, errMsg
|
||||
raise SqlmapUnsupportedFeatureException, errMsg
|
||||
|
||||
def osPwn(self):
|
||||
errMsg = "on SQLite it is not possible to establish an "
|
||||
errMsg += "out-of-band connection"
|
||||
raise sqlmapUnsupportedFeatureException, errMsg
|
||||
raise SqlmapUnsupportedFeatureException, errMsg
|
||||
|
||||
def osSmb(self):
|
||||
errMsg = "on SQLite it is not possible to establish an "
|
||||
errMsg += "out-of-band connection"
|
||||
raise sqlmapUnsupportedFeatureException, errMsg
|
||||
raise SqlmapUnsupportedFeatureException, errMsg
|
||||
|
||||
Reference in New Issue
Block a user