diff --git a/lib/wpscan/wp_target.rb b/lib/wpscan/wp_target.rb index 59fa5a64..833d7810 100644 --- a/lib/wpscan/wp_target.rb +++ b/lib/wpscan/wp_target.rb @@ -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]