mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
Bug fix for international letters decoded with --hex on MsSQL
This commit is contained in:
parent
ca427af8b3
commit
8617fe0d65
|
@ -3209,16 +3209,11 @@ def decodeHexValue(value):
|
|||
if value.lower().startswith("0x"):
|
||||
value = value[2:]
|
||||
value = value.decode("hex")
|
||||
if len(value) > 1 and value[1] == '\x00':
|
||||
if Backend.isDbms(DBMS.MSSQL):
|
||||
try:
|
||||
value = value.decode("utf-16-le")
|
||||
except UnicodeDecodeError:
|
||||
pass
|
||||
elif value and value[0] == '\x00':
|
||||
try:
|
||||
value = value.decode("utf-16-be")
|
||||
except UnicodeDecodeError:
|
||||
pass
|
||||
if not isinstance(value, unicode):
|
||||
value = value.decode("utf8", "replace")
|
||||
return value
|
||||
|
|
Loading…
Reference in New Issue
Block a user