From 6b0965a42293130fce0989b514ffac40c3c412af Mon Sep 17 00:00:00 2001 From: Michel Oosterhof Date: Tue, 30 Jun 2015 16:00:44 +0400 Subject: [PATCH] use normpath so abs path doesn't show up in log --- cowrie/core/protocol.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cowrie/core/protocol.py b/cowrie/core/protocol.py index 7a07f37..a78c24f 100644 --- a/cowrie/core/protocol.py +++ b/cowrie/core/protocol.py @@ -92,7 +92,7 @@ class HoneyPotBaseProtocol(insults.TerminalProtocol): if self.fs.exists(i): path = i break - txt = os.path.abspath('%s/%s' % \ + txt = os.path.normpath('%s/%s' % \ (self.env.cfg.get('honeypot', 'txtcmds_path'), path)) if os.path.exists(txt) and os.path.isfile(txt): return self.txtcmd(txt)