Skip to content

Commit 698ca26

Browse files
committed
Do not delete files that do not exist in rm_f
1 parent 9de4137 commit 698ca26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/msf/core/post/file.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ def upload_file(remote, local)
310310
def rm_f(*remote_files)
311311
remote_files.each do |remote|
312312
if session.type == "meterpreter"
313-
session.fs.file.delete(remote)
313+
session.fs.file.delete(remote) if exist?(remote)
314314
else
315315
if session.platform =~ /win/
316316
cmd_exec("del /q /f #{remote}")

0 commit comments

Comments
 (0)