handle 302's, print error codes since its important

git-svn-id: file:///home/svn/framework3/trunk@10928 4d416f70-5f16-0410-b530-b9f4589650da
unstable
cg 2010-11-06 14:45:22 +00:00
parent dc43689578
commit b3713f9d46
1 changed files with 5 additions and 3 deletions

View File

@ -79,10 +79,12 @@ class Metasploit3 < Msf::Auxiliary
if (res.nil?)
print_error("no response for #{ip}:#{rport} #{check}")
elsif (res.code == 200 and res.body =~ /\<\?xml version\="1.0" encoding="utf-8"\?\>/)
print_status("#{rhost}:#{rport} #{check} #{res.code}\n #{res.body}")
print_status("#{rhost}:#{rport} #{check} #{res.code}\n #{res.body}")
elsif (res and res.code == 302 or res.code == 301)
print_status(" Received 302 to #{res.headers['Location']} for #{check}")
else
#print_error("#{res.code} for #{check}")
''
print_error("#{res.code} for #{check}")
#''
end
end
rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout, Rex::ConnectionError =>e