Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure modules honor spooler settings #18954

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions lib/msf/ui/console/command_dispatcher/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1421,10 +1421,14 @@ def cmd_spool(*args)
color = driver.output.config[:color]

if args[0] == "off"
driver.init_ui(driver.input, Rex::Ui::Text::Output::Stdio.new)
stdout = Rex::Ui::Text::Output::Stdio.new
driver.init_ui(driver.input, stdout)
active_module.init_ui(driver.input, stdout) if defined?(active_module) && active_module
msg = "Spooling is now disabled"
else
driver.init_ui(driver.input, Rex::Ui::Text::Output::Tee.new(args[0]))
stdout = Rex::Ui::Text::Output::Tee.new(args[0])
driver.init_ui(driver.input, stdout)
active_module.init_ui(driver.input, stdout) if defined?(active_module) && active_module
msg = "Spooling to file #{args[0]}..."
end

Expand Down
Loading