mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-03 13:14:13 +03:00
minor update
This commit is contained in:
parent
d217cf71b2
commit
9c093d91f2
|
@ -1399,7 +1399,8 @@ def sanitizeAsciiString(subject):
|
|||
def getFilteredPageContent(page, onlyText=True):
|
||||
retVal = page
|
||||
|
||||
if isinstance(page, basestring):
|
||||
# only if the page's charset had been successfully identified
|
||||
if isinstance(page, unicode):
|
||||
retVal = re.sub(r"(?s)<script.+?</script>|<!--.+?-->|<style.+?</style>%s" % (r"|<[^>]+>|\t|\n|\r" if onlyText else ""), " ", page)
|
||||
|
||||
while retVal.find(" ") != -1:
|
||||
|
@ -1412,7 +1413,8 @@ def getFilteredPageContent(page, onlyText=True):
|
|||
def getPageTextWordsSet(page):
|
||||
retVal = None
|
||||
|
||||
if isinstance(page, basestring):
|
||||
# only if the page's charset had been successfully identified
|
||||
if isinstance(page, unicode):
|
||||
page = getFilteredPageContent(page)
|
||||
retVal = set(re.findall(r"\w+", page))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user