Skip to content

Commit

Permalink
Fix #16999
Browse files Browse the repository at this point in the history
  • Loading branch information
Andres Riancho committed May 24, 2018
1 parent f4b7631 commit 356b14b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions w3af/plugins/crawl/wordpress_fullpathdisclosure.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,17 @@ def _extract_paths(self, domain_path):
TODO: Will fail if WordPress is running on a Windows server due to
paths manipulation.
"""
theme_paths = []
wp_root_response = self._uri_opener.GET(domain_path, cache=True)

if is_404(wp_root_response):
return
return []

theme_paths = []
response_body = wp_root_response.get_body()

theme_regexp = '%swp-content/themes/(.*)/style.css' % domain_path
theme = re.search(theme_regexp, response_body, re.IGNORECASE)

if theme:
theme_name = theme.group(1)
for fname in ('header', 'footer'):
Expand Down

0 comments on commit 356b14b

Please sign in to comment.