Handle RSTs specifically, manage the probe timeout better.

git-svn-id: file:///home/svn/framework3/trunk@9551 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Tod Beardsley 2010-06-17 15:16:39 +00:00
parent be6e0b3393
commit 15bf5ff773
1 changed files with 10 additions and 2 deletions

View File

@ -29,18 +29,23 @@ class Metasploit3 < Msf::Auxiliary
) )
register_options( register_options(
[ [
OptBool.new('VERBOSE', [ true, 'Verbose output', false]) OptBool.new('VERBOSE', [ true, 'Verbose output', false]),
OptInt.new('TIMEOUT', [true, 'Timeout for the DB2 probe', 5])
], self.class) ], self.class)
deregister_options('USERNAME' , 'PASSWORD') deregister_options('USERNAME' , 'PASSWORD')
end end
def to
return 5 if datastore['TIMEOUT'].to_i.zero?
datastore['TIMEOUT'].to_i
end
def run_host(ip) def run_host(ip)
verbose = datastore['VERBOSE'] verbose = datastore['VERBOSE']
begin begin
info = db2_probe(2) info = db2_probe(to)
if info[:excsatrd] if info[:excsatrd]
inst,plat,ver,pta = info[:instance_name],info[:platform],info[:version],info[:plaintext_auth] inst,plat,ver,pta = info[:instance_name],info[:platform],info[:version],info[:plaintext_auth]
report_info = "Platform: #{plat}, Version: #{ver}, Instance: #{inst}, Plain-Authentication: #{pta ? "OK" : "NO"}" report_info = "Platform: #{plat}, Version: #{ver}, Instance: #{inst}, Plain-Authentication: #{pta ? "OK" : "NO"}"
@ -54,6 +59,9 @@ class Metasploit3 < Msf::Auxiliary
end end
disconnect disconnect
rescue ::Rex::ConnectionRefused
print_error("#{rhost}:#{rport} : Cannot connect to host") if verbose
return :done
rescue ::Rex::ConnectionError rescue ::Rex::ConnectionError
print_error("#{rhost}:#{rport} : Unable to attempt probe") if verbose print_error("#{rhost}:#{rport} : Unable to attempt probe") if verbose
return :done return :done