Fix: Removing timeout on login after a successful login

Timeout will then be defined by HoneyPotBaseProtocol class. Just like
for SSH.
This commit is contained in:
Olivier Bilodeau
2016-04-18 15:44:51 -04:00
committed by Michel Oosterhof
parent 61318e3c21
commit 31bdc68b0d

View File

@@ -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