From 6df6cdc997c1957ca8d7a1a3cf321d0878d4bc50 Mon Sep 17 00:00:00 2001 From: erwanlr Date: Thu, 20 Dec 2012 16:57:17 +0100 Subject: [PATCH] Typo & indentation --- lib/wpscan/modules/web_site.rb | 2 +- lib/wpscan/modules/wp_plugins.rb | 26 ++++++++++++------------ spec/lib/wpscan/modules/web_site_spec.rb | 4 ++-- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/wpscan/modules/web_site.rb b/lib/wpscan/modules/web_site.rb index 9ed62621..0093f8f4 100644 --- a/lib/wpscan/modules/web_site.rb +++ b/lib/wpscan/modules/web_site.rb @@ -86,7 +86,7 @@ module WebSite redirection end - # Returns the MD5 hash of the page given by url + # Return the MD5 hash of the page given by url def self.page_hash(url) Digest::MD5.hexdigest(Browser.instance.get(url).body) end diff --git a/lib/wpscan/modules/wp_plugins.rb b/lib/wpscan/modules/wp_plugins.rb index 09576b02..809ed6ed 100644 --- a/lib/wpscan/modules/wp_plugins.rb +++ b/lib/wpscan/modules/wp_plugins.rb @@ -24,7 +24,7 @@ module WpPlugins def plugins_from_aggressive_detection(options) options[:file] = options[:file] || (options[:full] ? "#{DATA_DIR}/plugins_full.txt" : "#{DATA_DIR}/plugins.txt") options[:vulns_file] = (options[:vulns_file] != nil and options[:vulns_file] != "") ? - options[:vulns_file] : DATA_DIR + "/plugin_vulns.xml" + options[:vulns_file] : DATA_DIR + "/plugin_vulns.xml" options[:vulns_xpath] = "//plugin[@name='#{@name}']/vulnerability" options[:vulns_xpath_2] = "//plugin" options[:type] = "plugins" @@ -32,12 +32,12 @@ module WpPlugins plugins = [] result.each do |r| plugins << WpPlugin.new( - :base_url => r.base_url, - :path => r.path, - :wp_content_dir => r.wp_content_dir, - :name => r.name, - :type => "plugins", - :wp_plugins_dir => r.wp_plugins_dir + :base_url => r.base_url, + :path => r.path, + :wp_content_dir => r.wp_content_dir, + :name => r.name, + :type => "plugins", + :wp_plugins_dir => r.wp_plugins_dir ) end plugins.sort_by { |p| p.name } @@ -55,12 +55,12 @@ module WpPlugins temp.each do |item| plugins << WpPlugin.new( - :base_url => item.base_url, - :name => item.name, - :path => item.path, - :wp_content_dir => options[:wp_content_dir], - :type => "plugins", - :wp_plugins_dir => options[:wp_plugins_dir] + :base_url => item.base_url, + :name => item.name, + :path => item.path, + :wp_content_dir => options[:wp_content_dir], + :type => "plugins", + :wp_plugins_dir => options[:wp_plugins_dir] ) end plugins.sort_by { |p| p.name } diff --git a/spec/lib/wpscan/modules/web_site_spec.rb b/spec/lib/wpscan/modules/web_site_spec.rb index d99aee60..f057a992 100644 --- a/spec/lib/wpscan/modules/web_site_spec.rb +++ b/spec/lib/wpscan/modules/web_site_spec.rb @@ -122,8 +122,8 @@ shared_examples_for "WebSite" do describe "#page_hash" do it "should return the MD5 hash of the page" do - url = "http://e.localhost/somepage.php" - body = "Hello World !" + url = "http://e.localhost/somepage.php" + body = "Hello World !" stub_request(:get, url).to_return(:body => body)