We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91700f1 commit a587975Copy full SHA for a587975
lib/msf/core/handler/reverse_tcp.rb
@@ -91,15 +91,18 @@ def start_handler
91
# Accept a client connection
92
begin
93
client = listener_sock.accept
94
- if !client
95
- wlog("#{handler_name}: No client received in call to accept, exiting...")
96
- else
+ if client
97
self.pending_connections += 1
98
lqueue.push(client)
99
end
100
- rescue StandardError
101
- wlog("#{handler_name}: Exception raised during listener accept: #{$ERROR_INFO}\n\n#{$ERROR_POSITION.join("\n")}")
102
- break
+ rescue Errno::ENOTCONN
+ nil
+ rescue StandardError => e
+ wlog [
+ "#{handler_name}: Exception raised during listener accept: #{e.class}",
103
+ "#{$ERROR_INFO}",
104
+ "#{$ERROR_POSITION.join("\n")}"
105
+ ].join("\n")
106
107
108
}
0 commit comments