mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 17:46:37 +03:00
Minor fix for escaping unicode strings in SQLite escaper
This commit is contained in:
parent
e5e39bc682
commit
0d2138a4a0
|
@ -8,6 +8,7 @@ See the file 'doc/COPYING' for copying permission
|
||||||
import binascii
|
import binascii
|
||||||
|
|
||||||
from lib.core.common import isDBMSVersionAtLeast
|
from lib.core.common import isDBMSVersionAtLeast
|
||||||
|
from lib.core.settings import UNICODE_ENCODING
|
||||||
from plugins.generic.syntax import Syntax as GenericSyntax
|
from plugins.generic.syntax import Syntax as GenericSyntax
|
||||||
|
|
||||||
class Syntax(GenericSyntax):
|
class Syntax(GenericSyntax):
|
||||||
|
@ -17,7 +18,7 @@ class Syntax(GenericSyntax):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def escape(expression, quote=True):
|
def escape(expression, quote=True):
|
||||||
def escaper(value):
|
def escaper(value):
|
||||||
return "CAST(X'%s' AS TEXT)" % binascii.hexlify(value)
|
return "CAST(X'%s' AS TEXT)" % binascii.hexlify(value.encode(UNICODE_ENCODING) if isinstance(value, unicode) else value)
|
||||||
|
|
||||||
retVal = expression
|
retVal = expression
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user