From 03a02cac29c22b79a2935c77fb07747beec27214 Mon Sep 17 00:00:00 2001 From: adfoster-r7 Date: Wed, 25 Sep 2024 13:48:46 +0100 Subject: [PATCH] Fix both_tty crash on startup --- lib/rex/ui/text/input.rb | 4 ++++ lib/rex/ui/text/output.rb | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lib/rex/ui/text/input.rb b/lib/rex/ui/text/input.rb index cf3aeded674af..5bebb1b16c0d4 100644 --- a/lib/rex/ui/text/input.rb +++ b/lib/rex/ui/text/input.rb @@ -79,6 +79,10 @@ def intrinsic_shell? false end + def tty? + false + end + def update_prompt(new_prompt = '', new_prompt_char = '') self.prompt = new_prompt + new_prompt_char end diff --git a/lib/rex/ui/text/output.rb b/lib/rex/ui/text/output.rb index ef8f8fd030c6c..0cec81a0d4b6f 100644 --- a/lib/rex/ui/text/output.rb +++ b/lib/rex/ui/text/output.rb @@ -86,6 +86,10 @@ def puts(*args) nil end + + def tty? + false + end end end