From e488cf4a37c363f1ef6f6f4c24ffbae4f361eb54 Mon Sep 17 00:00:00 2001 From: William Vu Date: Thu, 17 Jan 2019 13:58:03 -0600 Subject: [PATCH] Prefer Tempfile over Rex::Quickfile for info -d Rex::Quickfile undefines Tempfile's finalizer, preventing cleanup. --- lib/msf/ui/console/command_dispatcher/modules.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/msf/ui/console/command_dispatcher/modules.rb b/lib/msf/ui/console/command_dispatcher/modules.rb index f28a0071b4..a4aed76256 100644 --- a/lib/msf/ui/console/command_dispatcher/modules.rb +++ b/lib/msf/ui/console/command_dispatcher/modules.rb @@ -123,7 +123,7 @@ module Msf if dump_json print(Serializer::Json.dump_module(active_module) + "\n") elsif show_doc - f = Rex::Quickfile.new(["#{active_module.shortname}_doc", '.html']) + f = Tempfile.new(["#{active_module.shortname}_doc", '.html']) begin print_status("Generating documentation for #{active_module.shortname}, then opening #{f.path} in a browser...") Msf::Util::DocumentGenerator.spawn_module_document(active_module, f)