From 51d43d542a552c52304873c4f221f777f73608fc Mon Sep 17 00:00:00 2001 From: Michel Oosterhof Date: Sun, 21 May 2017 17:55:45 +0400 Subject: [PATCH] increase sessiosn size from 8 to 12 characters --- cowrie/ssh/transport.py | 2 +- cowrie/telnet/transport.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cowrie/ssh/transport.py b/cowrie/ssh/transport.py index bd96b75f..38451c72 100644 --- a/cowrie/ssh/transport.py +++ b/cowrie/ssh/transport.py @@ -26,7 +26,7 @@ class HoneyPotSSHTransport(transport.SSHServerTransport, TimeoutMixin): Called when the connection is made from the other side. We send our version, but wait with sending KEXINIT """ - self.transportId = uuid.uuid4().hex[:8] + self.transportId = uuid.uuid4().hex[:12] src_ip = self.transport.getPeer().host ipv4rex = re.compile(r'^::ffff:(\d+\.\d+\.\d+\.\d+)$') diff --git a/cowrie/telnet/transport.py b/cowrie/telnet/transport.py index bb92f26e..a3d66c61 100644 --- a/cowrie/telnet/transport.py +++ b/cowrie/telnet/transport.py @@ -204,7 +204,7 @@ class CowrieTelnetTransport(TelnetTransport, TimeoutMixin): """ """ def connectionMade(self): - self.transportId = uuid.uuid4().hex[:8] + self.transportId = uuid.uuid4().hex[:12] sessionno = self.transport.sessionno self.startTime = time.time() self.setTimeout(300)