Skip to content

Commit ef0f4d0

Browse files
RageLtMantodb
authored andcommitted
Fix Meterpreter edit command file removal
fs.rb was originally attempting to call the "close" method on a string holding the temporary path to the file being editted. Replaced with ::File.delete(temp_path).
1 parent 64b8696 commit ef0f4d0

File tree

1 file changed

+2
-1
lines changed
  • lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi

1 file changed

+2
-1
lines changed

lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,8 @@ def cmd_edit(*args)
324324
end
325325

326326
# Get rid of that pesky temporary file
327-
temp_path.close(true)
327+
::File.delete(temp_path)
328+
#temp_path.close(true)
328329
end
329330

330331
#

0 commit comments

Comments
 (0)