Reran tests, sorted out strip problem

bug/bundler_fix
Stuart Morgan 2015-05-11 18:29:44 +01:00
parent c25a5d3859
commit 99133deabb
1 changed files with 12 additions and 7 deletions

View File

@ -51,8 +51,10 @@ class Metasploit3 < Msf::Auxiliary
if !res.body.nil? if !res.body.nil?
# Very basic, just match the first title tag we come to. # Very basic, just match the first title tag we come to.
rx = %r{<title>[\n\t\s]*(?<title>.+?)[\s\n\t]*</title>}im.match(res.body.to_s.strip) rx = %r{<title>[\n\t\s]*(?<title>.+?)[\s\n\t]*</title>}im.match(res.body.to_s)
if rx && rx[:title] != '' if rx
rx[:title].strip!
if rx[:title] != ''
rx_title = CGI.unescapeHTML(rx[:title]) rx_title = CGI.unescapeHTML(rx[:title])
print_status("[#{target_host}:#{rport}] [C:#{res.code}] [R:#{location_header}] [S:#{server_header}] #{rx_title}") if datastore['SHOW_TITLES'] == true print_status("[#{target_host}:#{rport}] [C:#{res.code}] [R:#{location_header}] [S:#{server_header}] #{rx_title}") if datastore['SHOW_TITLES'] == true
if datastore['STORE_NOTES'] == true if datastore['STORE_NOTES'] == true
@ -62,6 +64,9 @@ class Metasploit3 < Msf::Auxiliary
else else
print_error("No webpage title from #{target_host}:#{rport}") if datastore['SHOW_ERRORS'] == true print_error("No webpage title from #{target_host}:#{rport}") if datastore['SHOW_ERRORS'] == true
end end
else
print_error("No webpage title from #{target_host}:#{rport}") if datastore['SHOW_ERRORS'] == true
end
else else
print_error("No webpage body from #{target_host}:#{rport}") if datastore['SHOW_ERRORS'] == true print_error("No webpage body from #{target_host}:#{rport}") if datastore['SHOW_ERRORS'] == true
end end