From e75fed058fc9f00be05352adfa2a082ff24e9667 Mon Sep 17 00:00:00 2001 From: Michel Oosterhof Date: Sat, 4 Oct 2014 13:15:06 +0000 Subject: [PATCH] only log stdin to separate file when using execcmd --- kippo/core/protocol.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kippo/core/protocol.py b/kippo/core/protocol.py index e4dcc1ee..66b34bb7 100644 --- a/kippo/core/protocol.py +++ b/kippo/core/protocol.py @@ -139,9 +139,9 @@ class HoneyPotExecProtocol(HoneyPotBaseProtocol): def connectionMade(self): HoneyPotBaseProtocol.connectionMade(self) + self.terminal.transport.session.conn.transport.stdinlog_open = True self.cmdstack = [core.honeypot.HoneyPotShell(self, interactive=False)] - print 'Running exec command "%s"' % self.execcmd self.cmdstack[0].lineReceived(self.execcmd) @@ -232,11 +232,11 @@ class LoggingServerProtocol(insults.ServerProtocol): transport.ttylog_open = True - transport.stdinlog_file = '%s/tty/%s-%s.log' % \ + 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)) - transport.stdinlog_open = True + transport.stdinlog_open = False insults.ServerProtocol.connectionMade(self)