mirror of
https://github.com/aljazceru/cowrie.git
synced 2025-12-17 22:14:19 +01:00
prevent duplicate files
git-svn-id: https://kippo.googlecode.com/svn/trunk@13 951d7100-d841-11de-b865-b3884708a8e2
This commit is contained in:
@@ -30,6 +30,10 @@ class command_tar(HoneyPotCommand):
|
||||
'XxX Anal Thunder 5 XxX.AVI',
|
||||
):
|
||||
size = 1000000 + int(random.random() * 4000000)
|
||||
|
||||
if f in [x[A_NAME] for x in cwd]:
|
||||
cwd.remove([x for x in cwd if x[A_NAME] == f][0])
|
||||
|
||||
cwd.append((
|
||||
f, T_FILE, 0, 0, size, 33188, time.time(), [], None))
|
||||
self.honeypot.writeln('./%s' % f)
|
||||
|
||||
Reference in New Issue
Block a user