Catch and deal with Rex::Proto::SMB::Exceptions::NoReply error from ensure simple.connect

This commit is contained in:
parzamendi-r7
2014-02-03 12:47:24 -06:00
parent 0d7acef189
commit cfebdae9d8
+5 -1
View File
@@ -138,7 +138,11 @@ class Metasploit3 < Msf::Auxiliary
rescue
status_code = :not_admin
ensure
simple.connect("\\\\#{datastore['RHOST']}\\IPC$")
begin
simple.connect("\\\\#{datastore['RHOST']}\\IPC$")
rescue ::Rex::Proto::SMB::Exceptions::NoReply
nil
end
end
end