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:
@@ -16,7 +16,7 @@ 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 SqlmapConnectionException
|
||||
from plugins.generic.connector import Connector as GenericConnector
|
||||
|
||||
class Connector(GenericConnector):
|
||||
@@ -42,7 +42,7 @@ class Connector(GenericConnector):
|
||||
try:
|
||||
self.connector = pymssql.connect(host="%s:%d" % (self.hostname, self.port), user=self.user, password=self.password, database=self.db, login_timeout=conf.timeout, timeout=conf.timeout)
|
||||
except pymssql.OperationalError, msg:
|
||||
raise sqlmapConnectionException, msg
|
||||
raise SqlmapConnectionException, msg
|
||||
|
||||
self.setCursor()
|
||||
self.connected()
|
||||
@@ -60,7 +60,7 @@ class Connector(GenericConnector):
|
||||
except (pymssql.OperationalError, pymssql.ProgrammingError), msg:
|
||||
logger.log(logging.WARN if conf.dbmsHandler else logging.DEBUG, "(remote) %s" % msg)
|
||||
except pymssql.InternalError, msg:
|
||||
raise sqlmapConnectionException, msg
|
||||
raise SqlmapConnectionException, msg
|
||||
|
||||
def select(self, query):
|
||||
self.execute(query)
|
||||
|
||||
@@ -17,8 +17,8 @@ from lib.core.data import logger
|
||||
from lib.core.data import queries
|
||||
from lib.core.dicts import SYBASE_TYPES
|
||||
from lib.core.enums import PAYLOAD
|
||||
from lib.core.exception import sqlmapMissingMandatoryOptionException
|
||||
from lib.core.exception import sqlmapNoneDataException
|
||||
from lib.core.exception import SqlmapMissingMandatoryOptionException
|
||||
from lib.core.exception import SqlmapNoneDataException
|
||||
from lib.core.settings import CURRENT_DB
|
||||
from lib.utils.pivotdumptable import pivotDumpTable
|
||||
from plugins.generic.enumeration import Enumeration as GenericEnumeration
|
||||
@@ -172,7 +172,7 @@ class Enumeration(GenericEnumeration):
|
||||
if ',' in conf.db:
|
||||
errMsg = "only one database name is allowed when enumerating "
|
||||
errMsg += "the tables' columns"
|
||||
raise sqlmapMissingMandatoryOptionException, errMsg
|
||||
raise SqlmapMissingMandatoryOptionException, errMsg
|
||||
|
||||
conf.db = safeSQLIdentificatorNaming(conf.db)
|
||||
|
||||
@@ -197,7 +197,7 @@ class Enumeration(GenericEnumeration):
|
||||
else:
|
||||
errMsg = "unable to retrieve the tables "
|
||||
errMsg += "on database '%s'" % unsafeSQLIdentificatorNaming(conf.db)
|
||||
raise sqlmapNoneDataException, errMsg
|
||||
raise SqlmapNoneDataException, errMsg
|
||||
|
||||
for tbl in tblList:
|
||||
tblList[tblList.index(tbl)] = safeSQLIdentificatorNaming(tbl)
|
||||
|
||||
@@ -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 Sybase it is not possible to read files"
|
||||
raise sqlmapUnsupportedFeatureException, errMsg
|
||||
raise SqlmapUnsupportedFeatureException, errMsg
|
||||
|
||||
def writeFile(self, wFile, dFile, fileType=None):
|
||||
errMsg = "on Sybase it is not possible to write files"
|
||||
raise sqlmapUnsupportedFeatureException, errMsg
|
||||
raise SqlmapUnsupportedFeatureException, errMsg
|
||||
|
||||
@@ -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 sqlmapSyntaxException
|
||||
from lib.core.exception import SqlmapSyntaxException
|
||||
from plugins.generic.syntax import Syntax as GenericSyntax
|
||||
|
||||
class Syntax(GenericSyntax):
|
||||
@@ -24,7 +24,7 @@ class Syntax(GenericSyntax):
|
||||
index = expression[firstIndex:].find("'")
|
||||
|
||||
if index == -1:
|
||||
raise sqlmapSyntaxException("Unenclosed ' in '%s'" % expression)
|
||||
raise SqlmapSyntaxException("Unenclosed ' in '%s'" % expression)
|
||||
|
||||
lastIndex = firstIndex + index
|
||||
old = "'%s'" % expression[firstIndex:lastIndex]
|
||||
@@ -47,7 +47,7 @@ class Syntax(GenericSyntax):
|
||||
index = expression[firstIndex:].find("))")
|
||||
|
||||
if index == -1:
|
||||
raise sqlmapSyntaxException("Unenclosed ) in '%s'" % expression)
|
||||
raise SqlmapSyntaxException("Unenclosed ) in '%s'" % expression)
|
||||
|
||||
lastIndex = firstIndex + index + 1
|
||||
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 Sybase it is not possible to execute commands"
|
||||
raise sqlmapUnsupportedFeatureException, errMsg
|
||||
raise SqlmapUnsupportedFeatureException, errMsg
|
||||
|
||||
def osShell(self):
|
||||
errMsg = "on Sybase it is not possible to execute commands"
|
||||
raise sqlmapUnsupportedFeatureException, errMsg
|
||||
raise SqlmapUnsupportedFeatureException, errMsg
|
||||
|
||||
def osPwn(self):
|
||||
errMsg = "on Sybase it is not possible to establish an "
|
||||
errMsg += "out-of-band connection"
|
||||
raise sqlmapUnsupportedFeatureException, errMsg
|
||||
raise SqlmapUnsupportedFeatureException, errMsg
|
||||
|
||||
def osSmb(self):
|
||||
errMsg = "on Sybase 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