From 6167596c20cae4c4c07ddab0f05b9c1dbdcda1ae Mon Sep 17 00:00:00 2001 From: Simon Janusz <85949464+sjanusz-r7@users.noreply.github.com> Date: Wed, 11 Dec 2024 16:22:18 +0000 Subject: [PATCH] Revert "Use existing input object when calling init_tab_complete" --- lib/msf/ui/console/driver.rb | 2 +- lib/rex/ui/text/shell.rb | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/msf/ui/console/driver.rb b/lib/msf/ui/console/driver.rb index 710373cca1..bc42cb1a4c 100644 --- a/lib/msf/ui/console/driver.rb +++ b/lib/msf/ui/console/driver.rb @@ -107,7 +107,7 @@ class Driver < Msf::Ui::Driver # Initialize the user interface to use a different input and output # handle if one is supplied input = opts['LocalInput'] - input ||= Rex::Ui::Text::Input::Readline.new + input ||= Rex::Ui::Text::Input::Stdio.new if !opts['Readline'] input.disable_readline diff --git a/lib/rex/ui/text/shell.rb b/lib/rex/ui/text/shell.rb index ca080ab614..56a323c5bf 100644 --- a/lib/rex/ui/text/shell.rb +++ b/lib/rex/ui/text/shell.rb @@ -66,7 +66,8 @@ module Shell def init_tab_complete if (self.input and self.input.supports_readline) # Unless cont_flag because there's no tab complete for continuation lines - self.input.reset_tab_completion(lambda { |str| tab_complete(str) unless cont_flag }) + self.input = Input::Readline.new(lambda { |str| tab_complete(str) unless cont_flag }) + self.input.output = self.output end end