Fix service name reporting

git-svn-id: file:///home/svn/framework3/trunk@7999 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2009-12-28 00:37:56 +00:00
parent 75cfef006a
commit 131462fa8b
1 changed files with 2 additions and 4 deletions

View File

@ -39,15 +39,13 @@ class Metasploit3 < Msf::Auxiliary
begin
res = send_request_raw({
'uri' => '/',
'method' => 'GET',
'agent' => 'Metasploit',
'connection' => 'close'
'method' => 'GET'
}, 10)
if (res and res.headers['Server'])
extra = http_fingerprint(res)
print_status("#{ip} is running #{res.headers['Server']}#{extra}")
report_service(:host => ip, :port => rport, :name => (ssl ? 'https' : 'http'), :info => "#{res.headers['Server']}#{extra}")
report_service(:host => ip, :port => rport, :name => 'http', :info => "#{res.headers['Server']}#{extra}")
end
rescue ::Timeout::Error, ::Errno::EPIPE