diff --git a/lib/msf/core/exploit/smb/client.rb b/lib/msf/core/exploit/smb/client.rb index 335fd7d111..cc22c8c2bf 100644 --- a/lib/msf/core/exploit/smb/client.rb +++ b/lib/msf/core/exploit/smb/client.rb @@ -220,6 +220,8 @@ module Msf def smb_file_exist?(file) begin fd = simple.open(file, 'o') + rescue RubySMB::Error::UnexpectedStatusCode => e + found = false rescue Rex::Proto::SMB::Exceptions::ErrorCode => e # If attempting to open the file results in a "*_NOT_FOUND" error, # then we can be sure the file is not there.