diff --git a/kippo/core/protocol.py b/kippo/core/protocol.py index 2aa8ee24..273b848d 100644 --- a/kippo/core/protocol.py +++ b/kippo/core/protocol.py @@ -238,17 +238,14 @@ class LoggingServerProtocol(insults.ServerProtocol): transport.ttylog_file = '%s/tty/%s-%s.log' % \ (config().get('honeypot', 'log_path'), - time.strftime('%Y%m%d-%H%M%S'), - int(random.random() * 10000)) + time.strftime('%Y%m%d-%H%M%S'), transport.transportId ) log.msg( 'Opening TTY log: %s' % transport.ttylog_file ) ttylog.ttylog_open(transport.ttylog_file, time.time()) - transport.ttylog_open = True transport.stdinlog_file = '%s/%s-%s-stdin.log' % \ (config().get('honeypot', 'download_path'), - time.strftime('%Y%m%d-%H%M%S'), - int(random.random() * 10000)) + time.strftime('%Y%m%d-%H%M%S'), transport.transportId ) transport.stdinlog_open = False insults.ServerProtocol.connectionMade(self) diff --git a/kippo/core/ssh.py b/kippo/core/ssh.py index 8f2654cc..a4f59871 100644 --- a/kippo/core/ssh.py +++ b/kippo/core/ssh.py @@ -162,7 +162,7 @@ class HoneyPotTransport(transport.SSHServerTransport): def connectionMade(self): self.logintime = time.time() - self.transportId = uuid.uuid4().hex + self.transportId = uuid.uuid4().hex[:8] log.msg( 'New connection: %s:%s (%s:%s) [session: %d]' % \ (self.transport.getPeer().host, self.transport.getPeer().port,