From d3e651c2158195731905b8a1278be50b4a15ea17 Mon Sep 17 00:00:00 2001 From: Michel Oosterhof Date: Wed, 13 Apr 2016 20:19:49 +0400 Subject: [PATCH] harmonize sftp artifact filenames --- cowrie/core/fs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cowrie/core/fs.py b/cowrie/core/fs.py index 3be1937a..323d8691 100644 --- a/cowrie/core/fs.py +++ b/cowrie/core/fs.py @@ -338,9 +338,9 @@ class HoneyPotFilesystem(object): if openFlags & os.O_WRONLY == os.O_WRONLY or openFlags & os.O_RDWR == os.O_RDWR: # strip executable bit hostmode = mode & ~(111) - hostfile = '%s/sftp_%s_%s' % \ + hostfile = '%s/%s_sftp_%s' % \ (self.cfg.get('honeypot', 'download_path'), - time.strftime('%Y%m%d%H%M%S'), + time.strftime('%Y%m%d-%H%M%S'), re.sub('[^A-Za-z0-9]', '_', filename)) #log.msg("fs.open file for writing, saving to %s" % safeoutfile) self.mkfile(filename, 0, 0, 0, stat.S_IFREG | mode)