From 31bdc68b0d94acd2aa98ebc798a69679362a62ce Mon Sep 17 00:00:00 2001 From: Olivier Bilodeau Date: Mon, 18 Apr 2016 15:44:51 -0400 Subject: [PATCH] Fix: Removing timeout on login after a successful login Timeout will then be defined by HoneyPotBaseProtocol class. Just like for SSH. --- cowrie/telnet/transport.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cowrie/telnet/transport.py b/cowrie/telnet/transport.py index 4410d2a..95dcf37 100644 --- a/cowrie/telnet/transport.py +++ b/cowrie/telnet/transport.py @@ -177,6 +177,7 @@ class HoneyPotTelnetAuthProtocol(AuthenticatingTelnetProtocol, TimeoutMixin): def _cbLogin(self, ial): """ + Fired on a successful login """ interface, protocol, logout = ial self.protocol = protocol @@ -186,6 +187,10 @@ class HoneyPotTelnetAuthProtocol(AuthenticatingTelnetProtocol, TimeoutMixin): # transfer important state info to new transport protocol.transportId = self.transportId + # Remove the short timeout of the login prompt. Timeout will be + # provided later by the HoneyPotBaseProtocol class. + self.setTimeout(None) + # replace myself with avatar protocol protocol.makeConnection(self.transport) self.transport.protocol = protocol