diff --git a/doc/WpDetector.html b/doc/WpDetector.html index ebd52250..d7f07f8b 100644 --- a/doc/WpDetector.html +++ b/doc/WpDetector.html @@ -237,7 +237,17 @@ enum_results = WpEnumerator.enumerate(options) enum_results.each do |enum_result| - result << enum_result + already_present = false + result.each do |r| + # Already found via passive detection + if r.name == enum_result.name + already_present = true + break + end + end + if not already_present + result << enum_result + end end result end @@ -274,7 +284,7 @@
-# File lib/wpscan/wp_detector.rb, line 40 +# File lib/wpscan/wp_detector.rb, line 50 def self.passive_detection(url, type, wp_content_dir) items = [] response = Browser.instance.get(url) @@ -288,7 +298,7 @@ names.uniq! names.each do |item| - items << { :base_url => url, :name => item, :path => "#{type}/#{item}" } + items << { :url => url, :name => item, :path => "#{type}/#{item}" } end items enddiff --git a/doc/WpEnumerator.html b/doc/WpEnumerator.html index 1479d2a8..5a12e907 100644 --- a/doc/WpEnumerator.html +++ b/doc/WpEnumerator.html @@ -226,7 +226,7 @@
targets - targets to enumerate
:base_url - Base URL
+:url - Base URL
:wp_content - wp-content directory
diff --git a/doc/WpItem.html b/doc/WpItem.html index a5846a4a..fbc54d34 100644 --- a/doc/WpItem.html +++ b/doc/WpItem.html @@ -67,6 +67,8 @@-# File lib/wpscan/modules/wp_item.rb, line 54 +# File lib/wpscan/modules/wp_item.rb, line 59 def <=>(item) item.name <=> @name end@@ -321,7 +323,7 @@
-# File lib/wpscan/modules/wp_item.rb, line 50 +# File lib/wpscan/modules/wp_item.rb, line 55 def ==(item) item.name == @name end@@ -354,7 +356,7 @@
-# File lib/wpscan/modules/wp_item.rb, line 36 +# File lib/wpscan/modules/wp_item.rb, line 41 def directory_listing? # Need to remove to file part from the url Browser.instance.get(location_uri_from_file_url(get_url.to_s)).body[%{<title>Index of}] ? true : false @@ -388,7 +390,7 @@@@ -435,6 +437,40 @@-# File lib/wpscan/modules/wp_item.rb, line 41 +# File lib/wpscan/modules/wp_item.rb, line 46 def extract_name_from_url(url) url.to_s[%{^(https?://.*/([^/]+)/)}, 2] end@@ -423,7 +425,7 @@# File lib/wpscan/modules/wp_item.rb, line 23 def get_url - URI.parse("#{@base_url.to_s}#@wp_content_dir/#@path") + URI.parse("#{@url.to_s}#@wp_content_dir/#@path") end
+# File lib/wpscan/modules/wp_item.rb, line 27 +def get_url_without_filename + uri = get_url + URI.parse("#{uri.scheme}://#{uri.host}#{File.dirname(uri.path)}") +end+
-# File lib/wpscan/modules/wp_item.rb, line 58 +# File lib/wpscan/modules/wp_item.rb, line 63 def location_uri_from_file_url(location_url) valid_location_url = location_url[%{^(https?://.*/)[^.]+\.[^/]+$}, 1] unless valid_location_url @@ -491,7 +527,7 @@+-# File lib/wpscan/modules/wp_item.rb, line 45 +# File lib/wpscan/modules/wp_item.rb, line 50 def to_s item_version = version "#@name#{' v' + item_version if item_version}" @@ -525,7 +561,7 @@@@ -238,6 +240,58 @@-# File lib/wpscan/modules/wp_item.rb, line 27 +# File lib/wpscan/modules/wp_item.rb, line 32 def version unless @version response = Browser.instance.get(get_url.merge("readme.txt").to_s) diff --git a/doc/WpLoginProtection.html b/doc/WpLoginProtection.html index d7effa5c..59cfbdfc 100644 --- a/doc/WpLoginProtection.html +++ b/doc/WpLoginProtection.html @@ -288,7 +288,7 @@ found return @login_protection_plugin = WpPlugin.new( :name => plugin_name, - :base_url => @uri.to_s + :url => @uri.to_s ) end end diff --git a/doc/WpPlugin.html b/doc/WpPlugin.html index 2d56f801..887b02c4 100644 --- a/doc/WpPlugin.html +++ b/doc/WpPlugin.html @@ -214,6 +214,28 @@ + + + @@ -240,9 +262,9 @@@@ -226,7 +228,7 @@ options[:vulns_xpath_2] = "//plugin" options[:type] = "plugins" result = WpDetector.aggressive_detection(options) - result + result.sort_by { |p| p.name } end-# File lib/wpscan/wp_plugin.rb, line 24 +# File lib/wpscan/wp_plugin.rb, line 26 def initialize(options = {}) - @base_url = options[:url] + @url = options[:url] @path = options[:path] @wp_content_dir = options[:wp_content_dir] @name = options[:name] || extract_name_from_url(get_url) @@ -250,7 +272,7 @@ @vulns_xpath = "//plugin[@name='#@name']/vulnerability" @version = nil - raise("base_url not set") unless @base_url + raise("url not set") unless @url raise("path not set") unless @path raise("wp_content_dir not set") unless @wp_content_dir raise("name not set") unless @name @@ -294,7 +316,7 @@ href="http://www.exploit-db.com/ghdb/3714/">www.exploit-db.com/ghdb/3714/-# File lib/wpscan/wp_plugin.rb, line 45 +# File lib/wpscan/wp_plugin.rb, line 47 def error_log? response_body = Browser.instance.get(error_log_url(), :headers => { "range" => "bytes=0-700"}).body response_body[%{PHP Fatal error}] ? true : false @@ -328,7 +350,7 @@ href="http://www.exploit-db.com/ghdb/3714/">www.exploit-db.com/ghdb/3714/-# File lib/wpscan/wp_plugin.rb, line 50 +# File lib/wpscan/wp_plugin.rb, line 52 def error_log_url get_url.merge("error_log").to_s enddiff --git a/doc/WpPlugins.html b/doc/WpPlugins.html index 8f521524..c4d96623 100644 --- a/doc/WpPlugins.html +++ b/doc/WpPlugins.html @@ -59,6 +59,8 @@- #plugins_from_aggressive_detection
+- #plugins_from_passive_detection
++ + + ++ ++ plugins_from_passive_detection(wp_content_dir) + click to toggle source ++ + ++ ++ + + + +code.google.com/p/wpscan/issues/detail?id=42 +plugins can be found in the source code :
+ +<script src='http://example.com/wp-content/plugins/s2member/...' /> +<link rel='stylesheet' href='http://example.com/wp-content/plugins/wp-minify/..' type='text/css' media='screen'/> +...+ +return array of WpPlugin
+ + + +++ ++# File lib/wpscan/modules/wp_plugins.rb, line 40 +def plugins_from_passive_detection(wp_content_dir) + plugins = [] + temp = WpDetector.passive_detection(url(), "plugins", wp_content_dir) + + temp.each do |item| + plugins << WpPlugin.new( + :url => item[:url], + :name => item[:name], + :path => item[:path], + :wp_content_dir => wp_content_dir + ) + end + plugins.sort_by { |p| p.name } +end+
# File lib/wpscan/wp_target.rb, line 76 def self.valid_response_codes - [200, 403, 301, 302] + [200, 403, 301, 302, 500] end
-# File lib/wpscan/wp_theme.rb, line 43 +# File lib/wpscan/wp_theme.rb, line 54 def self.find(target_uri) self.methods.grep(/find_from_/).each do |method_to_call| theme = self.send(method_to_call, target_uri) @@ -311,7 +323,7 @@new(name, options = {}) + class="method-args">(options = {}) click to toggle source@@ -324,13 +336,23 @@@@ -367,15 +389,20 @@-# File lib/wpscan/wp_theme.rb, line 25 -def initialize(name, options = {}) - @name = name - @vulns_xml = options[:vulns_xml] || DATA_DIR + '/wp_theme_vulns.xml' - @vulns_xpath = "//theme[@name='#{@name}']/vulnerability" - @style_url = options[:style_url] - @version = options[:version] +# File lib/wpscan/wp_theme.rb, line 26 +def initialize(options = {}) + @url = options[:url] + @name = options[:name] || extract_name_from_url(get_url) + @path = options[:path] + @wp_content_dir = options[:wp_content_dir] + @vulns_xml = options[:vulns_xml] || DATA_DIR + '/wp_theme_vulns.xml' + @vulns_xpath = "//theme[@name='#{@name}']/vulnerability" + + @version = options[:version] + @style_url = options[:style_url] + + raise("url not set") unless @url + raise("path not set") unless @path + raise("wp_content_dir not set") unless @wp_content_dir + raise("name not set") unless @name + raise("vulns_xml not set") unless @vulns_xml end@@ -408,7 +435,7 @@ href="http://code.google.com/p/wpscan/issues/detail?id=141">code.google.com/p/wp-# File lib/wpscan/wp_theme.rb, line 64 +# File lib/wpscan/wp_theme.rb, line 75 def self.find_from_css_link(target_uri) response = Browser.instance.get(target_uri.to_s, :follow_location => true, :max_redirects => 2) - if matches = %{https?://[^"]+/themes/([^"]+)/style.css}.match(response.body) + if matches = %{https?://[^"']+/themes/([^"']+)/style.css}.match(response.body) style_url = matches[0] theme_name = matches[1] - return new(theme_name, :style_url => style_url) + return new(:name => theme_name, + :style_url => style_url, + :url => style_url, + :path => "", + :wp_content_dir => "" + ) end end@@ -456,7 +488,7 @@ href="http://code.google.com/p/wpscan/issues/detail?id=141">code.google.com/p/wp-# File lib/wpscan/wp_theme.rb, line 76 +# File lib/wpscan/wp_theme.rb, line 92 def self.find_from_wooframework(target_uri) body = Browser.instance.get(target_uri.to_s).body regexp = %{<meta name="generator" content="([^\s"]+)\s?([^"]+)?" />\s+<meta name="generator" content="WooFramework\s?([^"]+)?" />} @@ -418,7 +445,12 @@ href="http://code.google.com/p/wpscan/issues/detail?id=141">code.google.com/p/wp woo_theme_version = matches[2] woo_framework_version = matches[3] # Not used at this time - return new(woo_theme_name, :version => woo_theme_version) + return new(:name => woo_theme_name, + :version => woo_theme_version, + :url => matches[0], + :path => "", + :wp_content_dir => "" + ) end end-# File lib/wpscan/wp_theme.rb, line 57 +# File lib/wpscan/wp_theme.rb, line 68 def ===(wp_theme) wp_theme.name === @name and wp_theme.version === @version end@@ -489,7 +521,7 @@ href="http://code.google.com/p/wpscan/issues/detail?id=141">code.google.com/p/wp-# File lib/wpscan/wp_theme.rb, line 52 +# File lib/wpscan/wp_theme.rb, line 63 def to_s version = version() "#{@name}#{' v' + version if version}" diff --git a/doc/WpscanOptions.html b/doc/WpscanOptions.html index f0ac6a8c..dc0b6921 100644 --- a/doc/WpscanOptions.html +++ b/doc/WpscanOptions.html @@ -272,7 +272,7 @@ href="WpscanOptions.html">WpscanOptions@@ -360,7 +355,7 @@ any remaining ‘-’ by ‘_’-# File lib/wpscan/wpscan_options.rb, line 134 +# File lib/wpscan/wpscan_options.rb, line 129 def self.load_from_arguments wpscan_options = WpscanOptions.new @@ -315,12 +315,7 @@ href="WpscanOptions.html">WpscanOptions# File lib/wpscan/wpscan_options.rb, line 47 def initialize - @enumerate_plugins = false - @enumerate_themes = false - @enumerate_only_vulnerable_plugins = false - @enumerate_only_vulnerable_themes = false - @enumerate_timthumbs = false - @enumerate_usernames = false + end-# File lib/wpscan/wpscan_options.rb, line 221 +# File lib/wpscan/wpscan_options.rb, line 216 def self.clean_option(option) cleaned_option = option.gsub(/^--?/, '') cleaned_option.gsub(/-/, '_') @@ -395,7 +390,7 @@ any remaining ‘-’ by ‘_’-# File lib/wpscan/wpscan_options.rb, line 193 +# File lib/wpscan/wpscan_options.rb, line 188 def self.get_opt_long GetoptLong.new( ["--url", "-u", GetoptLong::REQUIRED_ARGUMENT], @@ -443,7 +438,7 @@ any remaining ‘-’ by ‘_’-# File lib/wpscan/wpscan_options.rb, line 212 +# File lib/wpscan/wpscan_options.rb, line 207 def self.is_long_option?(option) ACCESSOR_OPTIONS.include?(:"#{WpscanOptions.clean_option(option)}") end@@ -476,7 +471,7 @@ any remaining ‘-’ by ‘_’-# File lib/wpscan/wpscan_options.rb, line 226 +# File lib/wpscan/wpscan_options.rb, line 221 def self.option_to_instance_variable_setter(option) cleaned_option = WpscanOptions.clean_option(option) option_syms = ACCESSOR_OPTIONS.grep(%{^#{cleaned_option}}) @@ -518,7 +513,7 @@ any remaining ‘-’ by ‘_’-# File lib/wpscan/wpscan_options.rb, line 90 +# File lib/wpscan/wpscan_options.rb, line 85 def enumerate_only_vulnerable_plugins=(enumerate_only_vulnerable_plugins) if enumerate_only_vulnerable_plugins === true and @enumerate_plugins === true raise "You can't enumerate plugins and only vulnerable plugins at the same time, please choose only one" @@ -555,7 +550,7 @@ any remaining ‘-’ by ‘_’-# File lib/wpscan/wpscan_options.rb, line 106 +# File lib/wpscan/wpscan_options.rb, line 101 def enumerate_only_vulnerable_themes=(enumerate_only_vulnerable_themes) if enumerate_only_vulnerable_themes === true and @enumerate_plugins === true raise "You can't enumerate themes and only vulnerable themes at the same time, please choose only one" @@ -596,7 +591,7 @@ href="http://1-10">u will enumerate usernames from 1 to 10-# File lib/wpscan/wpscan_options.rb, line 169 +# File lib/wpscan/wpscan_options.rb, line 164 def enumerate_options_from_string(value) # Usage of self is mandatory because there are overridden setters self.enumerate_only_vulnerable_plugins = true if value =~ /p!/ @@ -647,7 +642,7 @@ href="http://1-10">u will enumerate usernames from 1 to 10-# File lib/wpscan/wpscan_options.rb, line 82 +# File lib/wpscan/wpscan_options.rb, line 77 def enumerate_plugins=(enumerate_plugins) if enumerate_plugins === true and @enumerate_only_vulnerable_plugins === true raise "You can't enumerate plugins and only vulnerable plugins at the same time, please choose only one" @@ -684,7 +679,7 @@ href="http://1-10">u will enumerate usernames from 1 to 10-# File lib/wpscan/wpscan_options.rb, line 98 +# File lib/wpscan/wpscan_options.rb, line 93 def enumerate_themes=(enumerate_themes) if enumerate_themes === true and @enumerate_only_vulnerable_themes === true raise "You can't enumerate themes and only vulnerable themes at the same time, please choose only one" @@ -721,7 +716,7 @@ href="http://1-10">u will enumerate usernames from 1 to 10-# File lib/wpscan/wpscan_options.rb, line 114 +# File lib/wpscan/wpscan_options.rb, line 109 def has_options? !to_h.empty? end@@ -754,7 +749,7 @@ href="http://1-10">u will enumerate usernames from 1 to 10-# File lib/wpscan/wpscan_options.rb, line 74 +# File lib/wpscan/wpscan_options.rb, line 69 def proxy=(proxy) if proxy.index(':') == nil raise "Invalid proxy format. Should be host:port." @@ -792,7 +787,7 @@ value-# File lib/wpscan/wpscan_options.rb, line 148 +# File lib/wpscan/wpscan_options.rb, line 143 def set_option_from_cli(cli_option, cli_value) if WpscanOptions.is_long_option?(cli_option) @@ -838,7 +833,7 @@ value-# File lib/wpscan/wpscan_options.rb, line 62 +# File lib/wpscan/wpscan_options.rb, line 57 def threads=(threads) @threads = threads.is_a?(Integer) ? threads : threads.to_i end@@ -871,7 +866,7 @@ value-# File lib/wpscan/wpscan_options.rb, line 119 +# File lib/wpscan/wpscan_options.rb, line 114 def to_h options = {} @@ -913,7 +908,7 @@ value-# File lib/wpscan/wpscan_options.rb, line 56 +# File lib/wpscan/wpscan_options.rb, line 51 def url=(url) raise "Empty URL given" if !url @@ -948,7 +943,7 @@ value-# File lib/wpscan/wpscan_options.rb, line 66 +# File lib/wpscan/wpscan_options.rb, line 61 def wordlist=(wordlist) if File.exists?(wordlist) @wordlist = wordlist diff --git a/doc/created.rid b/doc/created.rid index 3834f6d0..b5ddb543 100644 --- a/doc/created.rid +++ b/doc/created.rid @@ -1,4 +1,4 @@ -Sat, 15 Sep 2012 23:28:11 +0200 +Sun, 16 Sep 2012 10:27:57 +0200 ./CREDITS Thu, 13 Sep 2012 22:54:08 +0200 ./lib/browser.rb Sat, 15 Sep 2012 08:03:56 +0200 ./lib/cache_file_store.rb Sat, 15 Sep 2012 08:04:03 +0200 @@ -14,28 +14,28 @@ Sat, 15 Sep 2012 23:28:11 +0200 ./lib/wpscan/modules/web_site.rb Sat, 15 Sep 2012 08:01:06 +0200 ./lib/wpscan/modules/wp_config_backup.rb Sat, 15 Sep 2012 08:01:11 +0200 ./lib/wpscan/modules/wp_full_path_disclosure.rb Sat, 15 Sep 2012 08:01:17 +0200 -./lib/wpscan/modules/wp_item.rb Sat, 15 Sep 2012 20:10:43 +0200 -./lib/wpscan/modules/wp_login_protection.rb Sat, 15 Sep 2012 16:18:05 +0200 -./lib/wpscan/modules/wp_plugins.rb Sat, 15 Sep 2012 23:15:20 +0200 +./lib/wpscan/modules/wp_item.rb Sun, 16 Sep 2012 10:26:21 +0200 +./lib/wpscan/modules/wp_login_protection.rb Sun, 16 Sep 2012 10:26:51 +0200 +./lib/wpscan/modules/wp_plugins.rb Sun, 16 Sep 2012 10:27:05 +0200 ./lib/wpscan/modules/wp_readme.rb Sat, 15 Sep 2012 08:01:52 +0200 -./lib/wpscan/modules/wp_themes.rb Sat, 15 Sep 2012 23:14:57 +0200 +./lib/wpscan/modules/wp_themes.rb Sun, 16 Sep 2012 10:27:17 +0200 ./lib/wpscan/modules/wp_timthumbs.rb Sat, 15 Sep 2012 08:01:58 +0200 ./lib/wpscan/modules/wp_usernames.rb Sat, 15 Sep 2012 08:02:04 +0200 ./lib/wpscan/msfrpc_client.rb Sat, 15 Sep 2012 08:02:28 +0200 ./lib/wpscan/vulnerable.rb Sat, 15 Sep 2012 08:02:37 +0200 -./lib/wpscan/wp_detector.rb Sat, 15 Sep 2012 20:54:19 +0200 -./lib/wpscan/wp_enumerator.rb Sat, 15 Sep 2012 23:27:28 +0200 +./lib/wpscan/wp_detector.rb Sun, 16 Sep 2012 10:25:30 +0200 +./lib/wpscan/wp_enumerator.rb Sun, 16 Sep 2012 10:25:41 +0200 ./lib/wpscan/wp_options.rb Sat, 15 Sep 2012 23:15:59 +0200 -./lib/wpscan/wp_plugin.rb Sat, 15 Sep 2012 22:09:03 +0200 -./lib/wpscan/wp_target.rb Sat, 15 Sep 2012 21:29:17 +0200 -./lib/wpscan/wp_theme.rb Sat, 15 Sep 2012 08:02:58 +0200 +./lib/wpscan/wp_plugin.rb Sun, 16 Sep 2012 10:27:39 +0200 +./lib/wpscan/wp_target.rb Sat, 15 Sep 2012 23:32:52 +0200 +./lib/wpscan/wp_theme.rb Sun, 16 Sep 2012 10:27:45 +0200 ./lib/wpscan/wp_version.rb Sat, 15 Sep 2012 08:03:04 +0200 ./lib/wpscan/wp_vulnerability.rb Sat, 15 Sep 2012 08:03:09 +0200 ./lib/wpscan/wpscan_helper.rb Sat, 15 Sep 2012 21:19:30 +0200 -./lib/wpscan/wpscan_options.rb Sat, 15 Sep 2012 21:55:29 +0200 +./lib/wpscan/wpscan_options.rb Sun, 16 Sep 2012 10:10:51 +0200 ./lib/wpstools/generate_list.rb Sat, 15 Sep 2012 08:03:43 +0200 -./lib/wpstools/parse_svn.rb Sat, 15 Sep 2012 08:03:36 +0200 +./lib/wpstools/parse_svn.rb Sat, 15 Sep 2012 23:36:25 +0200 ./lib/wpstools/wpstools_helper.rb Sat, 15 Sep 2012 08:03:49 +0200 ./README Thu, 13 Sep 2012 22:54:08 +0200 -./wpscan.rb Sat, 15 Sep 2012 22:20:21 +0200 +./wpscan.rb Sun, 16 Sep 2012 10:23:36 +0200 ./wpstools.rb Sat, 15 Sep 2012 08:06:35 +0200 diff --git a/doc/index.html b/doc/index.html index 0d12a69a..3f5b6743 100644 --- a/doc/index.html +++ b/doc/index.html @@ -125,10 +125,10 @@- ::enumerate — WpEnumerator
-- ::find — WpVersion
-- ::find — WpTheme
+- ::find — WpVersion
+- ::find_from_advanced_fingerprinting — WpVersion
- ::find_from_css_link — WpTheme
@@ -161,29 +161,29 @@- ::malwares_file — Malwares
-- ::new — CacheFileStore
- -- ::new — Exploit
- -- ::new — WpPlugin
+- ::new — WpscanOptions
- ::new — WpVulnerability
-- ::new — Generate_List
+- ::new — RpcClient
-- ::new — WpTheme
+- ::new — WpPlugin
+ +- ::new — CacheFileStore
- ::new — WpVersion
-- ::new — RpcClient
+- ::new — Generate_List
+ +- ::new — Updater
- ::new — Svn_Parser
-- ::new — WpscanOptions
-- ::new — WpTarget
-- ::new — Updater
+- ::new — Exploit
+ +- ::new — WpTheme
- ::option_to_instance_variable_setter — WpscanOptions
@@ -277,6 +277,8 @@- #get_url — WpItem
+- #get_url_without_filename — WpItem
+- #grep — Array
- #has_better_wp_security_protection? — WpLoginProtection
@@ -311,10 +313,10 @@- #is_installed? — Updater
-- #is_installed? — SvnUpdater
-- #is_installed? — GitUpdater
+- #is_installed? — SvnUpdater
+- #is_online? — WebSite
- #is_wordpress? — WebSite
@@ -333,11 +335,11 @@- #load_config — Browser
-- #local_revision_number — Updater
+- #local_revision_number — SvnUpdater
- #local_revision_number — GitUpdater
-- #local_revision_number — SvnUpdater
+- #local_revision_number — Updater
- #location_uri_from_file_url — WpItem
@@ -359,14 +361,16 @@- #meterpreter_read — Exploit
-- #meterpreter_write — RpcClient
-- #meterpreter_write — Exploit
+- #meterpreter_write — RpcClient
+- #parse — Svn_Parser
- #plugins_from_aggressive_detection — WpPlugins
+- #plugins_from_passive_detection — WpPlugins
+- #post — Browser
- #proxy= — WpscanOptions
@@ -393,10 +397,10 @@- #session_count — Exploit
-- #sessions — RpcClient
-- #sessions — Exploit
+- #sessions — RpcClient
+- #set_option_from_cli — WpscanOptions
- #simple_login_lockdown_url — WpLoginProtection
@@ -409,6 +413,8 @@- #themes_from_aggressive_detection — WpThemes
+- #themes_from_passive_detection — WpThemes
+- #threads= — WpscanOptions
- #timthumbs — WpTimthumbs
@@ -439,10 +445,10 @@- #usernames — WpUsernames
-- #version — WpItem
-- #version — WpTarget
+- #version — WpItem
+- #vulnerabilities — Vulnerable
- #wordlist= — WpscanOptions
diff --git a/doc/lib/wpscan/modules/wp_item_rb.html b/doc/lib/wpscan/modules/wp_item_rb.html index 0690e1ae..2a56eb3a 100644 --- a/doc/lib/wpscan/modules/wp_item_rb.html +++ b/doc/lib/wpscan/modules/wp_item_rb.html @@ -24,7 +24,7 @@
- Last Modified
-- 2012-09-15 20:10:43 +0200
+- 2012-09-16 10:26:21 +0200
- Requires
diff --git a/doc/lib/wpscan/modules/wp_login_protection_rb.html b/doc/lib/wpscan/modules/wp_login_protection_rb.html index 5570d2f4..7fb2830f 100644 --- a/doc/lib/wpscan/modules/wp_login_protection_rb.html +++ b/doc/lib/wpscan/modules/wp_login_protection_rb.html @@ -24,7 +24,7 @@
- Last Modified
-- 2012-09-15 16:18:05 +0200
+- 2012-09-16 10:26:51 +0200
- Requires
diff --git a/doc/lib/wpscan/modules/wp_plugins_rb.html b/doc/lib/wpscan/modules/wp_plugins_rb.html index 5c750396..e23e3f94 100644 --- a/doc/lib/wpscan/modules/wp_plugins_rb.html +++ b/doc/lib/wpscan/modules/wp_plugins_rb.html @@ -24,7 +24,7 @@
- Last Modified
-- 2012-09-15 23:15:20 +0200
+- 2012-09-16 10:27:05 +0200
- Requires
diff --git a/doc/lib/wpscan/wp_detector_rb.html b/doc/lib/wpscan/wp_detector_rb.html index 45eec883..f097cbb4 100644 --- a/doc/lib/wpscan/wp_detector_rb.html +++ b/doc/lib/wpscan/wp_detector_rb.html @@ -24,7 +24,7 @@
- Last Modified
-- 2012-09-15 20:54:19 +0200
+- 2012-09-16 10:25:30 +0200
- Requires
diff --git a/doc/lib/wpscan/wp_enumerator_rb.html b/doc/lib/wpscan/wp_enumerator_rb.html index dee3c4cb..667412ec 100644 --- a/doc/lib/wpscan/wp_enumerator_rb.html +++ b/doc/lib/wpscan/wp_enumerator_rb.html @@ -24,7 +24,7 @@
- Last Modified
-- 2012-09-15 23:27:28 +0200
+- 2012-09-16 10:25:41 +0200
- Requires
diff --git a/doc/lib/wpscan/wp_plugin_rb.html b/doc/lib/wpscan/wp_plugin_rb.html index 80f1fac6..d0de8016 100644 --- a/doc/lib/wpscan/wp_plugin_rb.html +++ b/doc/lib/wpscan/wp_plugin_rb.html @@ -24,7 +24,7 @@
- Last Modified
-- 2012-09-15 22:09:03 +0200
+- 2012-09-16 10:27:39 +0200
- Requires
diff --git a/doc/lib/wpscan/wp_target_rb.html b/doc/lib/wpscan/wp_target_rb.html index 20f1b180..9c10cb8d 100644 --- a/doc/lib/wpscan/wp_target_rb.html +++ b/doc/lib/wpscan/wp_target_rb.html @@ -24,7 +24,7 @@
- Last Modified
-- 2012-09-15 21:29:17 +0200
+- 2012-09-15 23:32:52 +0200
- Requires
diff --git a/doc/lib/wpscan/wp_theme_rb.html b/doc/lib/wpscan/wp_theme_rb.html index 0409848d..f8a04404 100644 --- a/doc/lib/wpscan/wp_theme_rb.html +++ b/doc/lib/wpscan/wp_theme_rb.html @@ -24,7 +24,7 @@
- Last Modified
-- 2012-09-15 08:02:58 +0200
+- 2012-09-16 10:27:45 +0200
- Requires
diff --git a/doc/lib/wpscan/wpscan_options_rb.html b/doc/lib/wpscan/wpscan_options_rb.html index ceb7060a..a26386c6 100644 --- a/doc/lib/wpscan/wpscan_options_rb.html +++ b/doc/lib/wpscan/wpscan_options_rb.html @@ -24,7 +24,7 @@
- Last Modified
-- 2012-09-15 21:55:29 +0200
+- 2012-09-16 10:10:51 +0200
- Requires
diff --git a/doc/lib/wpstools/parse_svn_rb.html b/doc/lib/wpstools/parse_svn_rb.html index f1ea32f8..31aa2713 100644 --- a/doc/lib/wpstools/parse_svn_rb.html +++ b/doc/lib/wpstools/parse_svn_rb.html @@ -24,7 +24,7 @@
- Last Modified
-- 2012-09-15 08:03:36 +0200
+- 2012-09-15 23:36:25 +0200
- Requires
diff --git a/doc/wpscan_rb.html b/doc/wpscan_rb.html index e3643ef6..0e961134 100644 --- a/doc/wpscan_rb.html +++ b/doc/wpscan_rb.html @@ -24,7 +24,7 @@
- Last Modified
-- 2012-09-15 22:20:21 +0200
+- 2012-09-16 10:23:36 +0200
- Requires
diff --git a/lib/wpscan/modules/wp_item.rb b/lib/wpscan/modules/wp_item.rb index 9febcc44..719758f7 100644 --- a/lib/wpscan/modules/wp_item.rb +++ b/lib/wpscan/modules/wp_item.rb @@ -17,11 +17,11 @@ #++ module WpItem - attr_accessor :path, :base_url, :wp_content_dir + attr_accessor :path, :url, :wp_content_dir @version = nil def get_url - URI.parse("#{@base_url.to_s}#@wp_content_dir/#@path") + URI.parse("#{@url.to_s}#@wp_content_dir/#@path") end def get_url_without_filename diff --git a/lib/wpscan/modules/wp_login_protection.rb b/lib/wpscan/modules/wp_login_protection.rb index 7ef10739..595976f6 100644 --- a/lib/wpscan/modules/wp_login_protection.rb +++ b/lib/wpscan/modules/wp_login_protection.rb @@ -38,7 +38,7 @@ module WpLoginProtection return @login_protection_plugin = WpPlugin.new( :name => plugin_name, - :base_url => @uri.to_s + :url => @uri.to_s ) end end diff --git a/lib/wpscan/modules/wp_plugins.rb b/lib/wpscan/modules/wp_plugins.rb index f2c851c4..a16d4fc2 100644 --- a/lib/wpscan/modules/wp_plugins.rb +++ b/lib/wpscan/modules/wp_plugins.rb @@ -43,7 +43,7 @@ module WpPlugins temp.each do |item| plugins << WpPlugin.new( - :base_url => item[:base_url], + :url => item[:url], :name => item[:name], :path => item[:path], :wp_content_dir => wp_content_dir diff --git a/lib/wpscan/modules/wp_themes.rb b/lib/wpscan/modules/wp_themes.rb index 22fe8a5c..4c2a1e3c 100644 --- a/lib/wpscan/modules/wp_themes.rb +++ b/lib/wpscan/modules/wp_themes.rb @@ -34,7 +34,7 @@ module WpThemes temp.each do |item| themes << WpPlugin.new( - :base_url => item[:base_url], + :url => item[:url], :name => item[:name], :path => item[:path], :wp_content_dir => wp_content_dir diff --git a/lib/wpscan/wp_detector.rb b/lib/wpscan/wp_detector.rb index f0e06256..96f67fbf 100644 --- a/lib/wpscan/wp_detector.rb +++ b/lib/wpscan/wp_detector.rb @@ -60,7 +60,7 @@ class WpDetector names.uniq! names.each do |item| - items << { :base_url => url, :name => item, :path => "#{type}/#{item}" } + items << { :url => url, :name => item, :path => "#{type}/#{item}" } end items end diff --git a/lib/wpscan/wp_enumerator.rb b/lib/wpscan/wp_enumerator.rb index 76012457..bb504f5e 100644 --- a/lib/wpscan/wp_enumerator.rb +++ b/lib/wpscan/wp_enumerator.rb @@ -24,7 +24,7 @@ class WpEnumerator # ==== Attributes # # * +targets+ - targets to enumerate - # * * +:base_url+ - Base URL + # * * +:url+ - Base URL # * * +:wp_content+ - wp-content directory # * * +:path+ - Path to plugin # * +type+ - "plugins" or "themes", item to enumerate diff --git a/lib/wpscan/wp_plugin.rb b/lib/wpscan/wp_plugin.rb index 28994577..ae1d58a6 100644 --- a/lib/wpscan/wp_plugin.rb +++ b/lib/wpscan/wp_plugin.rb @@ -24,7 +24,7 @@ class WpPlugin < Vulnerable attr_reader :name def initialize(options = {}) - @base_url = options[:url] + @url = options[:url] @path = options[:path] @wp_content_dir = options[:wp_content_dir] @name = options[:name] || extract_name_from_url(get_url) @@ -32,7 +32,7 @@ class WpPlugin < Vulnerable @vulns_xpath = "//plugin[@name='#@name']/vulnerability" @version = nil - raise("base_url not set") unless @base_url + raise("url not set") unless @url raise("path not set") unless @path raise("wp_content_dir not set") unless @wp_content_dir raise("name not set") unless @name diff --git a/lib/wpscan/wp_theme.rb b/lib/wpscan/wp_theme.rb index c28a2c3a..639a74f5 100644 --- a/lib/wpscan/wp_theme.rb +++ b/lib/wpscan/wp_theme.rb @@ -24,7 +24,7 @@ class WpTheme < Vulnerable attr_reader :name, :style_url, :version def initialize(options = {}) - @base_url = options[:url] + @url = options[:url] @name = options[:name] || extract_name_from_url(get_url) @path = options[:path] @wp_content_dir = options[:wp_content_dir] @@ -34,7 +34,7 @@ class WpTheme < Vulnerable @version = options[:version] @style_url = options[:style_url] - raise("base_url not set") unless @base_url + raise("url not set") unless @url raise("path not set") unless @path raise("wp_content_dir not set") unless @wp_content_dir raise("name not set") unless @name diff --git a/wpscan.rb b/wpscan.rb index f105b36f..559ec3dc 100755 --- a/wpscan.rb +++ b/wpscan.rb @@ -153,7 +153,7 @@ begin puts puts "[+] Enumerating plugins from passive detection ... " - plugins = wp_target.plugins_from_passive_detection + plugins = wp_target.plugins_from_passive_detection(wp_target.wp_content_dir) unless plugins.empty? puts "#{plugins.size} found :"