fix for custom content dir

This commit is contained in:
Christian Mehlmauer
2015-03-14 16:03:48 +01:00
parent aed74e029a
commit df598c5900
2 changed files with 21 additions and 1 deletions

View File

@@ -44,7 +44,13 @@ class WpTarget < WebSite
fail "The target is responding with a 403, this might be due to a WAF or a plugin.\n" \
'You should try to supply a valid user-agent via the --user-agent option or use the --random-agent option' if response.code == 403
if response.body =~ /["'][^"']*\/wp-content\/[^"']*["']/i
if wp_content_dir
dir = wp_content_dir
else
dir = 'wp-content'
end
if response.body =~ /["'][^"']*\/#{Regexp.escape(dir)}\/[^"']*["']/i
wordpress = true
else