1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-11-05 14:57:30 +01:00

rescue connection failure for netbios, suggest how to fix it

This commit is contained in:
Brent Cook 2017-05-30 08:06:39 -05:00
parent ee57c7188e
commit beb1cef835

View File

@ -263,10 +263,20 @@ class MetasploitModule < Msf::Exploit::Remote
'71710533-beba-4937-8319-b5dbef9ccc36', '1.0'
).first
sock = connect(false,
'RHOST' => rhost,
'RPORT' => 135
)
begin
sock = connect(false,
'RHOST' => rhost,
'RPORT' => 135
)
rescue ::Errno::ECONNRESET,
::Rex::HostUnreachable,
::Rex::ConnectionTimeout,
::Rex::ConnectionRefused => e
print_error(e.to_s)
print_warning('Target arch not detected for target OS')
print_warning('Disable VerifyArch option to proceed manually...')
return false
end
sock.put(pkt)