3434from lib .core .data import kb
3535from lib .core .data import logger
3636from lib .core .decorators import cachedmethod
37+ from lib .core .dicts import HTML_ENTITIES
3738from lib .core .enums import DBMS
3839from lib .core .enums import HTTP_HEADER
3940from lib .core .enums import PLACE
4950from lib .core .settings import VIEWSTATE_REGEX
5051from lib .parse .headers import headersParser
5152from lib .parse .html import htmlParser
52- from lib .utils .htmlentities import htmlEntities
5353from thirdparty import six
5454from thirdparty .chardet import detect
5555from thirdparty .identywaf import identYwaf
@@ -341,7 +341,7 @@ def decodePage(page, contentEncoding, contentType):
341341 page = re .sub (b"%([0-9a-fA-F]{2})" , lambda _ : decodeHex (_ .group (1 )), page )
342342
343343 # e.g. &
344- page = re .sub (b"&([^;]+);" , lambda _ : six .int2byte (htmlEntities [getText (_ .group (1 ))]) if htmlEntities .get (getText (_ .group (1 )), 256 ) < 256 else _ .group (0 ), page )
344+ page = re .sub (b"&([^;]+);" , lambda _ : six .int2byte (HTML_ENTITIES [getText (_ .group (1 ))]) if HTML_ENTITIES .get (getText (_ .group (1 )), 256 ) < 256 else _ .group (0 ), page )
345345
346346 kb .pageEncoding = kb .pageEncoding or checkCharEncoding (getHeuristicCharEncoding (page ))
347347
@@ -364,7 +364,7 @@ def _(match):
364364 page = re .sub (r"&#(\d+);" , _ , page )
365365
366366 # e.g. ζ
367- page = re .sub (r"&([^;]+);" , lambda _ : _unichr (htmlEntities [_ .group (1 )]) if htmlEntities .get (_ .group (1 ), 0 ) > 255 else _ .group (0 ), page )
367+ page = re .sub (r"&([^;]+);" , lambda _ : _unichr (HTML_ENTITIES [_ .group (1 )]) if HTML_ENTITIES .get (_ .group (1 ), 0 ) > 255 else _ .group (0 ), page )
368368
369369 return page
370370
0 commit comments