Skip to content

Commit f5f7b4d

Browse files
committed
handle sessions still open
1 parent e995ccf commit f5f7b4d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/rex/ui/text/shell.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def run(&block)
128128

129129
while true
130130
# If the stop flag was set or we've hit EOF, break out
131-
break if (self.stop_flag or self.stop_count > 1)
131+
break if self.stop_flag || self.stop_count > 1
132132

133133
init_tab_complete
134134

@@ -378,6 +378,8 @@ def get_input_line
378378
output.input = nil
379379
log_output(input.prompt)
380380
else
381+
self.stop_count += 1
382+
next if self.stop_count > 1
381383
run_single("quit")
382384
end
383385
end

0 commit comments

Comments
 (0)