From 7747a5665b7d110dfd24e3690224600f6e738467 Mon Sep 17 00:00:00 2001 From: erwanlr Date: Tue, 15 Apr 2014 22:48:22 +0200 Subject: [PATCH] Ref #454 - --follow-redirection now works along with the --batch option --- wpscan.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/wpscan.rb b/wpscan.rb index 3ac41f0a..ea279ced 100755 --- a/wpscan.rb +++ b/wpscan.rb @@ -63,17 +63,15 @@ def main end end - redirection = wp_target.redirection - if redirection + if (redirection = wp_target.redirection) if wpscan_options.follow_redirection puts "Following redirection #{redirection}" - puts else - puts "The remote host tried to redirect us to: #{redirection}" + puts "The remote host redirects to: #{redirection}" puts '[?] Do you want follow the redirection ? [Y]es [N]o [A]bort, default: [N]' end - unless wpscan_options.batch + if wpscan_options.follow_redirection || !wpscan_options.batch if wpscan_options.follow_redirection || (input = Readline.readline) =~ /^y/i wpscan_options.url = redirection wp_target = WpTarget.new(redirection, wpscan_options.to_h)