rescue connection failure for netbios, suggest how to fix it
parent
ee57c7188e
commit
beb1cef835
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue