Do not delete files that do not exist in rm_f

bug/bundler_fix
Spencer McIntyre 2014-12-17 09:18:06 -05:00
parent 9de4137aa7
commit 698ca2639b
1 changed files with 1 additions and 1 deletions

View File

@ -310,7 +310,7 @@ module Msf::Post::File
def rm_f(*remote_files)
remote_files.each do |remote|
if session.type == "meterpreter"
session.fs.file.delete(remote)
session.fs.file.delete(remote) if exist?(remote)
else
if session.platform =~ /win/
cmd_exec("del /q /f #{remote}")