rescue connection failure for netbios, suggest how to fix it

bug/bundler_fix
Brent Cook 2017-05-30 08:06:39 -05:00
parent ee57c7188e
commit beb1cef835
1 changed files with 14 additions and 4 deletions

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)