From 6d3e2af06767c8af4a814167186e47d6cfbf7878 Mon Sep 17 00:00:00 2001 From: erwanlr Date: Fri, 11 Jan 2013 17:10:49 +0100 Subject: [PATCH] Fix #105 Proxy error checked before scanning --- wpscan.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wpscan.rb b/wpscan.rb index 5e032d93..b5e7c2ec 100755 --- a/wpscan.rb +++ b/wpscan.rb @@ -54,6 +54,14 @@ begin raise "The WordPress URL supplied '#{wp_target.uri}' seems to be down." end + if wpscan_options.proxy + proxy_reponse = Browser.instance.get(wp_target.url) + + unless WpTarget::valid_response_codes.include?(proxy_reponse.code) + raise "Proxy Error :\r\n#{proxy_reponse.headers}" + end + end + redirection = wp_target.redirection if redirection if wpscan_options.follow_redirection