Some more cleanup (Issue #475)

This commit is contained in:
stamparm 2013-07-01 12:11:09 +02:00
parent b5e644694a
commit 4fb33bb26c
5 changed files with 11 additions and 17 deletions

View File

@ -17,17 +17,11 @@ from plugins.generic.misc import Miscellaneous
class HSQLDBMap(Syntax, Fingerprint, Enumeration, Filesystem, Miscellaneous, Takeover):
"""
This class defines MySQL methods
This class defines HyperSQL methods
"""
def __init__(self):
self.excludeDbsList = HSQLDB_SYSTEM_DBS
self.sysUdfs = {
# UDF name: UDF return data-type
"sys_exec": { "return": "int" },
"sys_eval": { "return": "string" },
"sys_bineval": { "return": "int" }
}
Syntax.__init__(self)
Fingerprint.__init__(self)

View File

@ -13,9 +13,9 @@ class Filesystem(GenericFilesystem):
GenericFilesystem.__init__(self)
def readFile(self, rFile):
errMsg = "Not implemented in HSQLDB"
errMsg = "on HyperSQL it is not possible to read files"
raise SqlmapUnsupportedFeatureException(errMsg)
def writeFile(self, wFile, dFile, fileType=None, forceCheck=False):
errMsg = "Not implemented in HSQLDB"
errMsg = "on HyperSQL it is not possible to read files"
raise SqlmapUnsupportedFeatureException(errMsg)

View File

@ -146,5 +146,5 @@ class Fingerprint(GenericFingerprint):
return False
def getHostname(self):
warnMsg = "on HSQLDB it is not possible to enumerate the hostname"
warnMsg = "on HyperSQL it is not possible to enumerate the hostname"
logger.warn(warnMsg)

View File

@ -5,9 +5,6 @@ Copyright (c) 2006-2013 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
import binascii
from lib.core.convert import utf8encode
from plugins.generic.syntax import Syntax as GenericSyntax
class Syntax(GenericSyntax):
@ -20,6 +17,7 @@ class Syntax(GenericSyntax):
>>> Syntax.escape("SELECT 'abcdefgh' FROM foobar")
'SELECT CHAR(97)||CHAR(98)||CHAR(99)||CHAR(100)||CHAR(101)||CHAR(102)||CHAR(103)||CHAR(104) FROM foobar'
"""
def escaper(value):
return "||".join("CHAR(%d)" % ord(value[i]) for i in xrange(len(value)))

View File

@ -13,17 +13,19 @@ class Takeover(GenericTakeover):
GenericTakeover.__init__(self)
def osCmd(self):
errMsg = "Not implemented in HSQLDB"
errMsg = "on HyperSQL it is not possible to execute commands"
raise SqlmapUnsupportedFeatureException(errMsg)
def osShell(self):
errMsg = "Not implemented in HSQLDB"
errMsg = "on HyperSQL it is not possible to execute commands"
raise SqlmapUnsupportedFeatureException(errMsg)
def osPwn(self):
errMsg = "Not implemented in HSQLDB"
errMsg = "on HyperSQL it is not possible to establish an "
errMsg += "out-of-band connection"
raise SqlmapUnsupportedFeatureException(errMsg)
def osSmb(self):
errMsg = "Not implemented in HSQLDB"
errMsg = "on HyperSQL it is not possible to establish an "
errMsg += "out-of-band connection"
raise SqlmapUnsupportedFeatureException(errMsg)