SMB updates, better reporting of SSL status for HTTP
git-svn-id: file:///home/svn/framework3/trunk@8459 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
c52b37ea17
commit
993ba44fcf
|
@ -78,15 +78,11 @@ module Exploit::Remote::HttpClient
|
|||
# Connects to an HTTP server.
|
||||
#
|
||||
def connect(opts={})
|
||||
|
||||
dossl = false
|
||||
if(opts.has_key?('SSL'))
|
||||
dossl = opts['SSL']
|
||||
else
|
||||
dossl = ssl
|
||||
if (datastore.default?('SSL') and rport.to_i == 443)
|
||||
dossl = true
|
||||
end
|
||||
end
|
||||
|
||||
nclient = Rex::Proto::Http::Client.new(
|
||||
|
@ -260,7 +256,7 @@ module Exploit::Remote::HttpClient
|
|||
# Returns the boolean indicating SSL
|
||||
#
|
||||
def ssl
|
||||
datastore['SSL']
|
||||
((datastore.default?('SSL') and rport.to_i == 443) or datastore['SSL'])
|
||||
end
|
||||
|
||||
#
|
||||
|
|
|
@ -282,6 +282,10 @@ module Exploit::Remote::SMB
|
|||
os = $1.strip
|
||||
sp = '(Build ' + $2 + ')'
|
||||
|
||||
when 'VxWorks'
|
||||
os = 'VxWorks'
|
||||
sp = smb_peer_lm()
|
||||
|
||||
when 'Unix'
|
||||
os = 'Unix'
|
||||
sv = smb_peer_lm()
|
||||
|
|
|
@ -45,7 +45,7 @@ class Metasploit3 < Msf::Auxiliary
|
|||
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 => 'http', :info => "#{res.headers['Server']}#{extra}")
|
||||
report_service(:host => ip, :port => rport, :name => (ssl ? 'https' : 'http'), :info => "#{res.headers['Server']}#{extra}")
|
||||
end
|
||||
|
||||
rescue ::Timeout::Error, ::Errno::EPIPE
|
||||
|
|
|
@ -76,8 +76,20 @@ class Metasploit3 < Msf::Auxiliary
|
|||
when /Windows/
|
||||
os = OperatingSystems::WINDOWS
|
||||
else
|
||||
os = OperatingSystems::UNKNOWN
|
||||
case res['sp']
|
||||
when /apple/
|
||||
os = OperatingSystems::MAC_OSX
|
||||
when /ubuntu/
|
||||
os = 'Ubuntu'
|
||||
res['os'] = OperatingSystems::LINUX
|
||||
when /debian/
|
||||
os = 'Ubuntu'
|
||||
res['os'] = OperatingSystems::LINUX
|
||||
else
|
||||
os = OperatingSystems::UNKNOWN
|
||||
end
|
||||
end
|
||||
|
||||
report_host({
|
||||
:host => ip,
|
||||
:os_flavor => res['os'],
|
||||
|
|
Loading…
Reference in New Issue