diff --git a/lib/msf/core/exploit/smb/client/psexec.rb b/lib/msf/core/exploit/smb/client/psexec.rb index 2eb00cd21e..e04f47576d 100644 --- a/lib/msf/core/exploit/smb/client/psexec.rb +++ b/lib/msf/core/exploit/smb/client/psexec.rb @@ -330,14 +330,14 @@ module Exploit::Remote::SMB::Client::Psexec if smb_share =~ /.[\\\/]/ simple.connect("\\\\#{datastore['RHOST']}\\#{smbshare}") begin - simple.delete("\\#{fileprefix}\\#{filename}") + simple.delete("#{fileprefix}\\#{filename}") rescue XCEPT::ErrorCode => e print_error("Delete of \\#{fileprefix}\\#{filename} failed: #{e.message}") end else simple.connect("\\\\#{datastore['RHOST']}\\#{smbshare}") begin - simple.delete("\\#{filename}") + simple.delete("#{filename}") rescue XCEPT::ErrorCode => e print_error("Delete of \\#{filename} failed: #{e.message}") end