WpTarget.wp_content_dir regex was not matching if path was '/'. Removed path from first regex.

This commit is contained in:
ethicalhack3r
2012-10-21 02:04:16 +02:00
parent ebf45da742
commit 50436a83b5

View File

@@ -93,7 +93,7 @@ class WpTarget
# Only use the path because domain can be text or an ip
uri_path = @uri.path
if index_body[/#{Regexp.escape(uri_path)}\/wp-content\/(?:themes|plugins)\//i]
if index_body[/\/wp-content\/(?:themes|plugins)\//i]
@wp_content_dir = "wp-content"
else
@wp_content_dir = index_body[/(?:href|src)\s*=\s*(?:"|').+#{Regexp.escape(uri_path)}([^"']+)\/(?:themes|plugins)\/.*(?:"|')/i, 1]