See #726. Post-commit fixes. Rename probe to version, clean up includes, fix verbosity on the probe and convert to single-line output.
git-svn-id: file:///home/svn/framework3/trunk@8224 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
359e1ad53a
commit
7cc01b07f3
|
@ -15,7 +15,6 @@ require 'msf/core'
|
|||
|
||||
class Metasploit3 < Msf::Auxiliary
|
||||
|
||||
include Msf::Exploit::Remote::Tcp
|
||||
include Msf::Exploit::Remote::DB2
|
||||
include Msf::Auxiliary::AuthBrute
|
||||
include Msf::Auxiliary::Scanner
|
||||
|
|
|
@ -15,7 +15,6 @@ require 'msf/core'
|
|||
|
||||
class Metasploit3 < Msf::Auxiliary
|
||||
|
||||
include Msf::Exploit::Remote::Tcp
|
||||
include Msf::Exploit::Remote::DB2
|
||||
include Msf::Auxiliary::Scanner
|
||||
include Msf::Auxiliary::Report
|
||||
|
@ -28,21 +27,28 @@ class Metasploit3 < Msf::Auxiliary
|
|||
'Author' => ['todb'],
|
||||
'License' => MSF_LICENSE
|
||||
)
|
||||
register_options(
|
||||
[
|
||||
OptBool.new('VERBOSE', [ true, 'Verbose output', false])
|
||||
], self.class)
|
||||
|
||||
deregister_options('USERNAME' , 'PASSWORD')
|
||||
end
|
||||
|
||||
|
||||
def run_host(ip)
|
||||
verbose = datastore['VERBOSE']
|
||||
begin
|
||||
|
||||
info = db2_probe(2)
|
||||
if info[:excsatrd]
|
||||
print_status("DB2 Server information for #{ip}:")
|
||||
print_status(" Instance = #{info[:instance_name]}")
|
||||
print_status(" Platform = #{info[:platform]}")
|
||||
print_status(" Version = #{info[:version]}")
|
||||
print_status(" Plaintext Auth? = #{info[:plaintext_auth]}")
|
||||
inst,plat,ver,pta = info[:instance_name],info[:platform],info[:version],info[:plaintext_auth]
|
||||
report_info = "#{plat} : #{ver} : #{inst} : PlainAuth-#{pta ? "OK" : "NO"}"
|
||||
print_status("#{ip}:#{rport} DB2: #{report_info}")
|
||||
report_service(:host => rhost,
|
||||
:port => rport,
|
||||
:name => "db2",
|
||||
:info => report_info)
|
||||
end
|
||||
disconnect
|
||||
|
Loading…
Reference in New Issue