Ref #454 - --follow-redirection now works along with the --batch option

This commit is contained in:
erwanlr
2014-04-15 22:48:22 +02:00
parent aa617b5106
commit 7747a5665b

View File

@@ -63,17 +63,15 @@ def main
end end
end end
redirection = wp_target.redirection if (redirection = wp_target.redirection)
if redirection
if wpscan_options.follow_redirection if wpscan_options.follow_redirection
puts "Following redirection #{redirection}" puts "Following redirection #{redirection}"
puts
else 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]' puts '[?] Do you want follow the redirection ? [Y]es [N]o [A]bort, default: [N]'
end end
unless wpscan_options.batch if wpscan_options.follow_redirection || !wpscan_options.batch
if wpscan_options.follow_redirection || (input = Readline.readline) =~ /^y/i if wpscan_options.follow_redirection || (input = Readline.readline) =~ /^y/i
wpscan_options.url = redirection wpscan_options.url = redirection
wp_target = WpTarget.new(redirection, wpscan_options.to_h) wp_target = WpTarget.new(redirection, wpscan_options.to_h)