smb_file_exist check for rubysmb
parent
8e36551b22
commit
5e02e7a2c8
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue