From 976f678368d1fde791c7d65076d3b0085a8a2255 Mon Sep 17 00:00:00 2001 From: Michel Oosterhof Date: Sun, 28 Feb 2016 23:46:05 +0000 Subject: [PATCH] fix command logging --- cowrie/core/honeypot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cowrie/core/honeypot.py b/cowrie/core/honeypot.py index ee75052..f30d315 100644 --- a/cowrie/core/honeypot.py +++ b/cowrie/core/honeypot.py @@ -188,6 +188,7 @@ class HoneyPotShell(object): return cmdAndArgs = self.cmdpending.pop(0) + cmd2 = copy.copy(cmdAndArgs) # Probably no reason to be this comprehensive for just PATH... environ = copy.copy(self.environ) @@ -215,7 +216,7 @@ class HoneyPotShell(object): rargs.append(arg) cmdclass = self.protocol.getCommand(cmd, environ['PATH'].split(':')) if cmdclass: - log.msg(eventid='cowrie.command.success', input=' '.join(cmdAndArgs), format='Command found: %(input)s') + log.msg(eventid='cowrie.command.success', input=' '.join(cmd2), format='Command found: %(input)s') self.protocol.call_command(cmdclass, *rargs) else: log.msg(eventid='cowrie.command.failed',