mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-23 01:56:36 +03:00
important fix regarding encoding stuff
This commit is contained in:
parent
f6f4b5e9dd
commit
345e2288e1
|
@ -1417,7 +1417,7 @@ def getUnicode(value, encoding=None):
|
||||||
if isinstance(value, unicode):
|
if isinstance(value, unicode):
|
||||||
return value
|
return value
|
||||||
elif isinstance(value, basestring):
|
elif isinstance(value, basestring):
|
||||||
return unicode(value, encoding or conf.dataEncoding)
|
return unicode(value, encoding or conf.dataEncoding, errors="replace")
|
||||||
else:
|
else:
|
||||||
return unicode(value) # encoding ignored for non-basestring instances
|
return unicode(value) # encoding ignored for non-basestring instances
|
||||||
|
|
||||||
|
@ -2218,6 +2218,6 @@ def decodeIntToUnicode(value):
|
||||||
Decodes inferenced integer value with usage of current page encoding
|
Decodes inferenced integer value with usage of current page encoding
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
return struct.pack('>H', value).decode(kb.pageEncoding)
|
return struct.pack('B' if value<256 else '>H', value).decode(kb.pageEncoding)
|
||||||
except:
|
except:
|
||||||
return INFERENCE_UNKNOWN_CHAR
|
return INFERENCE_UNKNOWN_CHAR
|
||||||
|
|
Loading…
Reference in New Issue
Block a user