diff --git a/lib/rex/ui/text/shell.rb b/lib/rex/ui/text/shell.rb index 96c9ccfd9d..8920404630 100644 --- a/lib/rex/ui/text/shell.rb +++ b/lib/rex/ui/text/shell.rb @@ -110,11 +110,10 @@ module Shell # Run the command processing loop. # def run(&block) - stop_flag = false begin - - while ((line = input.pgets)) + + while (not self.stop_flag and (line = input.pgets)) log_output(input.prompt) # If a block was passed in, pass the line to it. If it returns true,