mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 08:14:24 +03:00
bug fix
This commit is contained in:
parent
0eb2c408a9
commit
bbffea2cbc
|
@ -7,16 +7,14 @@ Copyright (c) 2006-2010 sqlmap developers (http://sqlmap.sourceforge.net/)
|
|||
See the file 'doc/COPYING' for copying permission
|
||||
"""
|
||||
|
||||
from lib.core.data import kb
|
||||
from lib.core.datatype import advancedDict
|
||||
|
||||
class Unescaper(advancedDict):
|
||||
def __init__(self):
|
||||
self.__unescaper = None
|
||||
|
||||
def setUnescape(self, unescapeFunction):
|
||||
self.__unescaper = unescapeFunction
|
||||
pass
|
||||
|
||||
def unescape(self, expression, quote=True):
|
||||
return self.__unescaper(expression, quote=quote)
|
||||
return self[kb.dbms if kb.dbms else kb.misc.testedDbms](expression, quote=quote)
|
||||
|
||||
unescaper = Unescaper()
|
||||
|
|
|
@ -33,5 +33,4 @@ class AccessMap(Syntax, Fingerprint, Enumeration, Filesystem, Miscellaneous, Tak
|
|||
Miscellaneous.__init__(self)
|
||||
Takeover.__init__(self)
|
||||
|
||||
unescaper[DBMS.ACCESS] = AccessMap.unescape
|
||||
unescaper.setUnescape(AccessMap.unescape)
|
||||
unescaper[DBMS.ACCESS] = Syntax.unescape
|
||||
|
|
|
@ -33,5 +33,4 @@ class FirebirdMap(Syntax, Fingerprint, Enumeration, Filesystem, Miscellaneous, T
|
|||
Miscellaneous.__init__(self)
|
||||
Takeover.__init__(self)
|
||||
|
||||
unescaper[DBMS.FIREBIRD] = FirebirdMap.unescape
|
||||
unescaper.setUnescape(FirebirdMap.unescape)
|
||||
unescaper[DBMS.FIREBIRD] = Syntax.unescape
|
||||
|
|
|
@ -33,5 +33,4 @@ class MaxDBMap(Syntax, Fingerprint, Enumeration, Filesystem, Miscellaneous, Take
|
|||
Miscellaneous.__init__(self)
|
||||
Takeover.__init__(self)
|
||||
|
||||
unescaper[DBMS.MAXDB] = MaxDBMap.unescape
|
||||
unescaper.setUnescape(MaxDBMap.unescape)
|
||||
unescaper[DBMS.MAXDB] = Syntax.unescape
|
||||
|
|
|
@ -34,5 +34,4 @@ class MSSQLServerMap(Syntax, Fingerprint, Enumeration, Filesystem, Miscellaneous
|
|||
Miscellaneous.__init__(self)
|
||||
Takeover.__init__(self)
|
||||
|
||||
unescaper[DBMS.MSSQL] = MSSQLServerMap.unescape
|
||||
unescaper.setUnescape(MSSQLServerMap.unescape)
|
||||
unescaper[DBMS.MSSQL] = Syntax.unescape
|
||||
|
|
|
@ -39,5 +39,4 @@ class MySQLMap(Syntax, Fingerprint, Enumeration, Filesystem, Miscellaneous, Take
|
|||
Miscellaneous.__init__(self)
|
||||
Takeover.__init__(self)
|
||||
|
||||
unescaper[DBMS.MYSQL] = MySQLMap.unescape
|
||||
unescaper.setUnescape(MySQLMap.unescape)
|
||||
unescaper[DBMS.MYSQL] = Syntax.unescape
|
||||
|
|
|
@ -33,5 +33,4 @@ class OracleMap(Syntax, Fingerprint, Enumeration, Filesystem, Miscellaneous, Tak
|
|||
Miscellaneous.__init__(self)
|
||||
Takeover.__init__(self)
|
||||
|
||||
unescaper[DBMS.ORACLE] = OracleMap.unescape
|
||||
unescaper.setUnescape(OracleMap.unescape)
|
||||
unescaper[DBMS.ORACLE] = Syntax.unescape
|
||||
|
|
|
@ -40,5 +40,4 @@ class PostgreSQLMap(Syntax, Fingerprint, Enumeration, Filesystem, Miscellaneous,
|
|||
Miscellaneous.__init__(self)
|
||||
Takeover.__init__(self)
|
||||
|
||||
unescaper[DBMS.PGSQL] = PostgreSQLMap.unescape
|
||||
unescaper.setUnescape(PostgreSQLMap.unescape)
|
||||
unescaper[DBMS.PGSQL] = Syntax.unescape
|
||||
|
|
|
@ -33,5 +33,4 @@ class SQLiteMap(Syntax, Fingerprint, Enumeration, Filesystem, Miscellaneous, Tak
|
|||
Miscellaneous.__init__(self)
|
||||
Takeover.__init__(self)
|
||||
|
||||
unescaper[DBMS.SQLITE] = SQLiteMap.unescape
|
||||
unescaper.setUnescape(SQLiteMap.unescape)
|
||||
unescaper[DBMS.SQLITE] = Syntax.unescape
|
||||
|
|
|
@ -33,5 +33,4 @@ class SybaseMap(Syntax, Fingerprint, Enumeration, Filesystem, Miscellaneous, Tak
|
|||
Miscellaneous.__init__(self)
|
||||
Takeover.__init__(self)
|
||||
|
||||
unescaper[DBMS.SYBASE] = SybaseMap.unescape
|
||||
unescaper.setUnescape(SybaseMap.unescape)
|
||||
unescaper[DBMS.SYBASE] = Syntax.unescape
|
||||
|
|
Loading…
Reference in New Issue
Block a user