From 8d9356f40dd7b4ed0e598a8d353cf5b269798741 Mon Sep 17 00:00:00 2001 From: HD Moore Date: Sat, 17 Oct 2009 16:53:21 +0000 Subject: [PATCH] Minor tweak allows the 'quit' command to work inside of a resource script git-svn-id: file:///home/svn/framework3/trunk@7177 4d416f70-5f16-0410-b530-b9f4589650da --- lib/rex/ui/text/shell.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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,