mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 17:46:37 +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"):
|
if value.lower().startswith("0x"):
|
||||||
value = value[2:]
|
value = value[2:]
|
||||||
value = value.decode("hex")
|
value = value.decode("hex")
|
||||||
if len(value) > 1 and value[1] == '\x00':
|
if Backend.isDbms(DBMS.MSSQL):
|
||||||
try:
|
try:
|
||||||
value = value.decode("utf-16-le")
|
value = value.decode("utf-16-le")
|
||||||
except UnicodeDecodeError:
|
except UnicodeDecodeError:
|
||||||
pass
|
pass
|
||||||
elif value and value[0] == '\x00':
|
|
||||||
try:
|
|
||||||
value = value.decode("utf-16-be")
|
|
||||||
except UnicodeDecodeError:
|
|
||||||
pass
|
|
||||||
if not isinstance(value, unicode):
|
if not isinstance(value, unicode):
|
||||||
value = value.decode("utf8", "replace")
|
value = value.decode("utf8", "replace")
|
||||||
return value
|
return value
|
||||||
|
|
Loading…
Reference in New Issue
Block a user