mirror of
https://github.com/aljazceru/cowrie.git
synced 2026-02-23 15:24:30 +01:00
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:
committed by
Michel Oosterhof
parent
61318e3c21
commit
31bdc68b0d
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user