Reran tests, sorted out strip problem
parent
c25a5d3859
commit
99133deabb
|
@ -51,8 +51,10 @@ class Metasploit3 < Msf::Auxiliary
|
|||
|
||||
if !res.body.nil?
|
||||
# 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)
|
||||
if rx && rx[:title] != ''
|
||||
rx = %r{<title>[\n\t\s]*(?<title>.+?)[\s\n\t]*</title>}im.match(res.body.to_s)
|
||||
if rx
|
||||
rx[:title].strip!
|
||||
if 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
|
||||
if datastore['STORE_NOTES'] == true
|
||||
|
@ -62,6 +64,9 @@ class Metasploit3 < Msf::Auxiliary
|
|||
else
|
||||
print_error("No webpage title from #{target_host}:#{rport}") if datastore['SHOW_ERRORS'] == true
|
||||
end
|
||||
else
|
||||
print_error("No webpage title from #{target_host}:#{rport}") if datastore['SHOW_ERRORS'] == true
|
||||
end
|
||||
else
|
||||
print_error("No webpage body from #{target_host}:#{rport}") if datastore['SHOW_ERRORS'] == true
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue