From 50436a83b50c2ed8663f9eecf7099460469a99ab Mon Sep 17 00:00:00 2001 From: ethicalhack3r Date: Sun, 21 Oct 2012 02:04:16 +0200 Subject: [PATCH] WpTarget.wp_content_dir regex was not matching if path was '/'. Removed path from first regex. --- lib/wpscan/wp_target.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]