Fix missing end, use explicit Timeout class
git-svn-id: file:///home/svn/framework3/trunk@10366 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
b023d89469
commit
e939379b1b
|
@ -45,7 +45,7 @@ class Metasploit3 < Msf::Auxiliary
|
|||
|
||||
def run_host(target_host)
|
||||
begin
|
||||
timeout(to) do
|
||||
::Timeout.timeout(to) do
|
||||
|
||||
connect
|
||||
|
||||
|
|
|
@ -39,12 +39,13 @@ class Metasploit3 < Msf::Auxiliary
|
|||
|
||||
def run_host(ip)
|
||||
begin
|
||||
timeout(to) do
|
||||
res = connect
|
||||
# This makes db_services look a lot nicer.
|
||||
banner_santized = Rex::Text.to_hex_ascii(banner.to_s)
|
||||
print_status("#{ip}:#{rport} TELNET #{banner_santized}")
|
||||
report_service(:host => rhost, :port => rport, :name => "telnet", :info => banner_santized)
|
||||
::Timeout.timeout(to) do
|
||||
res = connect
|
||||
# This makes db_services look a lot nicer.
|
||||
banner_santized = Rex::Text.to_hex_ascii(banner.to_s)
|
||||
print_status("#{ip}:#{rport} TELNET #{banner_santized}")
|
||||
report_service(:host => rhost, :port => rport, :name => "telnet", :info => banner_santized)
|
||||
end
|
||||
rescue ::Rex::ConnectionError
|
||||
rescue Timeout::Error
|
||||
print_error("#{target_host}:#{rport}, Server timed out after #{to} seconds. Skipping.")
|
||||
|
|
Loading…
Reference in New Issue