Skip to content

Commit ac8b483

Browse files
author
Brent Cook
committed
don't break the accept loop just because we got a client connection that closed early
1 parent eb73612 commit ac8b483

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/msf/core/handler/reverse_tcp.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,10 @@ def start_handler
9191
client = self.listener_sock.accept
9292
if ! client
9393
wlog("ReverseTcpHandlerListener-#{local_port}: No client received in call to accept, exiting...")
94-
break
94+
else
95+
self.pending_connections += 1
96+
lqueue.push(client)
9597
end
96-
97-
self.pending_connections += 1
98-
lqueue.push(client)
9998
rescue ::Exception
10099
wlog("ReverseTcpHandlerListener-#{local_port}: Exception raised during listener accept: #{$!}\n\n#{$@.join("\n")}")
101100
break

0 commit comments

Comments
 (0)