Skip to content

Commit

Permalink
Update DynamicContentParser.py
Browse files Browse the repository at this point in the history
dont process if no dynamic marks
  • Loading branch information
maurosoria committed Feb 20, 2018
1 parent c9b21a2 commit 8e54746
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions thirdparty/sqlmap/DynamicContentParser.py
Expand Up @@ -82,7 +82,7 @@ def removeDynamicContent(self, page, dynamicMarks):
Removing dynamic content from supplied page basing removal on
precalculated dynamic markings
"""
if page:
if page and len(dynamicMarks) > 0:
encoding = chardet.detect(page)['encoding']
page = page.decode(encoding, errors='replace')
for item in dynamicMarks:
Expand All @@ -102,5 +102,5 @@ def removeDynamicContent(self, page, dynamicMarks):
page = re.sub(r'(?s){0}.+{1}'.format(re.escape(prefix), re.escape(suffix)), "{0}{1}".format(prefix.replace('\\', r'\\'), suffix.replace('\\', r'\\')), page)

page = page.encode()

return page

0 comments on commit 8e54746

Please sign in to comment.