mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
minor update/patch
This commit is contained in:
parent
300abc2ba2
commit
6f5ef23f28
|
@ -10,6 +10,7 @@ See the file 'doc/COPYING' for copying permission
|
|||
import binascii
|
||||
import re
|
||||
|
||||
from lib.core.convert import utf8encode
|
||||
from lib.core.exception import sqlmapSyntaxException
|
||||
from plugins.generic.syntax import Syntax as GenericSyntax
|
||||
|
||||
|
@ -25,7 +26,7 @@ class Syntax(GenericSyntax):
|
|||
try:
|
||||
unescaped = unescaped.replace(item, "0x%s" % binascii.hexlify(item.strip("'")))
|
||||
except UnicodeEncodeError:
|
||||
unescaped = unescaped.replace(item, "CHAR(0x%s USING utf8)" % "".join(("%.2x" % ord(_)) if ord(_) < 256 else ("%.4x" % ord(_)) for _ in item.strip("'")))
|
||||
unescaped = unescaped.replace(item, "CONVERT(0x%s USING utf8)" % "".join("%.2x" % ord(_) for _ in utf8encode(item.strip("'"))))
|
||||
else:
|
||||
unescaped = "0x%s" % binascii.hexlify(expression)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user