mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 04:31:30 +00:00
Update for an Issue #111
This commit is contained in:
@@ -211,11 +211,17 @@ def decodePage(page, contentEncoding, contentType):
|
|||||||
|
|
||||||
# can't do for all responses because we need to support binary files too
|
# 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"))):
|
if contentType and not isinstance(page, unicode) and any(map(lambda x: x in contentType.lower(), ("text/txt", "text/raw", "text/html", "text/xml"))):
|
||||||
|
# e.g. Ãëàâà
|
||||||
if "&#" in page:
|
if "&#" in page:
|
||||||
page = re.sub('&#(\d+);', lambda _: chr(int(_.group(1))), page)
|
page = re.sub('&#(\d+);', lambda _: chr(int(_.group(1))) if int(_.group(1)) < 256 else _.group(0), page)
|
||||||
|
|
||||||
kb.pageEncoding = kb.pageEncoding or checkCharEncoding(getHeuristicCharEncoding(page))
|
kb.pageEncoding = kb.pageEncoding or checkCharEncoding(getHeuristicCharEncoding(page))
|
||||||
page = getUnicode(page, kb.pageEncoding)
|
page = getUnicode(page, kb.pageEncoding)
|
||||||
|
|
||||||
|
# e.g. ’…™
|
||||||
|
if "&#" in page:
|
||||||
|
page = re.sub('&#(\d+);', lambda _: unichr(int(_.group(1))), page)
|
||||||
|
|
||||||
return page
|
return page
|
||||||
|
|
||||||
def processResponse(page, responseHeaders):
|
def processResponse(page, responseHeaders):
|
||||||
|
|||||||
Reference in New Issue
Block a user