Skip to content

Commit cd45ed0

Browse files
committed
Handle exceptions when connecting the SMBHSARE
1 parent 85b5c5a commit cd45ed0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

modules/auxiliary/admin/smb/check_dir_file.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ def run_host(ip)
9797
print_error("Host #{rhost} login error.")
9898
rescue ::Rex::ConnectionRefused
9999
print_error "Host #{rhost} unable to connect - connection refused"
100+
rescue ::Rex::Proto::SMB::Exceptions::ErrorCode
101+
print_error "Host #{rhost} unable to connect to share #{datastore['SMBSHARE']}"
100102
end # end begin
101103
end # end def
102104
end

0 commit comments

Comments
 (0)