From 447589541fcda62c7f0bb59bf55767bae745cd5a Mon Sep 17 00:00:00 2001 From: erwanlr Date: Wed, 16 Apr 2014 15:55:34 +0200 Subject: [PATCH] Fixes #458 - Follow the location when hashing a page --- lib/wpscan/web_site.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/wpscan/web_site.rb b/lib/wpscan/web_site.rb index d5fc81c7..220cf2d4 100644 --- a/lib/wpscan/web_site.rb +++ b/lib/wpscan/web_site.rb @@ -32,7 +32,7 @@ class WebSite def has_xml_rpc? response = Browser.get_and_follow_location(xml_rpc_url) - response.body =~ %r{XML-RPC server accepts POST requests only}i + response.body =~ %r{XML-RPC server accepts POST requests only}i end # See http://www.hixie.ch/specs/pingback/pingback-1.0#TOC2.3 @@ -71,7 +71,7 @@ class WebSite # # @return [ String ] The MD5 hash of the page def self.page_hash(page) - page = Browser.get(page) unless page.is_a?(Typhoeus::Response) + page = Browser.get(page, { followlocation: true, cache_ttl: 0 }) unless page.is_a?(Typhoeus::Response) Digest::MD5.hexdigest(page.body.gsub(//m, '')) end