Skip to content

Commit e26fb49

Browse files
committed
if we have no more input from the console, quit
1 parent 42b4381 commit e26fb49

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

lib/rex/ui/text/shell.rb

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -370,9 +370,14 @@ def get_input_line
370370
end
371371

372372
output.input = input
373-
line << input.pgets
374-
output.input = nil
375-
log_output(input.prompt)
373+
str = input.pgets
374+
if str
375+
line << str
376+
output.input = nil
377+
log_output(input.prompt)
378+
else
379+
run_single("quit")
380+
end
376381
end
377382
self.cont_flag = false
378383

0 commit comments

Comments
 (0)