mirror of
https://github.com/aljazceru/cowrie.git
synced 2025-12-24 01:14:27 +01:00
Fix issue #14, tar hangs when trying to unpack a file without a directory
(by jfbethlehem) git-svn-id: https://kippo.googlecode.com/svn/trunk@135 951d7100-d841-11de-b865-b3884708a8e2
This commit is contained in:
@@ -57,6 +57,9 @@ class command_tar(HoneyPotCommand):
|
||||
if f.isdir():
|
||||
self.fs.mkdir(dest, 0, 0, 4096, f.mode, f.mtime)
|
||||
elif f.isfile():
|
||||
if not self.fs.exists(os.path.dirname(dest)):
|
||||
self.fs.mkdir(os.path.dirname(dest),
|
||||
0, 0, 4096, f.mode, f.mtime)
|
||||
self.fs.mkfile(dest, 0, 0, f.size, f.mode, f.mtime)
|
||||
self.honeypot.commands[dest] = random.choice(dice.clist)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user