mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 12:41:30 +00:00
Implementing Issue #111
This commit is contained in:
@@ -209,8 +209,10 @@ def decodePage(page, contentEncoding, contentType):
|
||||
else:
|
||||
kb.pageEncoding = conf.charset
|
||||
|
||||
# can't do for all responses because we need to support binary files too
|
||||
if contentType and not isinstance(page, unicode) and any(map(lambda x: x in contentType.lower(), ("text/txt", "text/raw", "text/html", "text/xml"))):
|
||||
# can't do for all responses because we need to support binary files too
|
||||
if "&#" in page:
|
||||
page = re.sub('&#(\d+);', lambda _: chr(int(_.group(1))), page)
|
||||
kb.pageEncoding = kb.pageEncoding or checkCharEncoding(getHeuristicCharEncoding(page))
|
||||
page = getUnicode(page, kb.pageEncoding)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user