Do not delete files that do not exist in rm_f
parent
9de4137aa7
commit
698ca2639b
|
@ -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}")
|
||||
|
|
Loading…
Reference in New Issue