mirror of
https://github.com/aljazceru/cowrie.git
synced 2026-02-23 15:24:30 +01:00
twistedchecker formatting
This commit is contained in:
@@ -14,6 +14,8 @@ from cowrie.commands import dice, malware
|
||||
commands = {}
|
||||
|
||||
def pick_handler(cmd, size):
|
||||
"""
|
||||
"""
|
||||
if size in malware.slist:
|
||||
handler = malware.slist[size]
|
||||
elif cmd in malware.clist:
|
||||
@@ -22,15 +24,25 @@ def pick_handler(cmd, size):
|
||||
handler = random.choice(dice.clist)
|
||||
return handler
|
||||
|
||||
|
||||
|
||||
class command_tar(HoneyPotCommand):
|
||||
"""
|
||||
"""
|
||||
|
||||
def mkfullpath(self, path, f):
|
||||
"""
|
||||
"""
|
||||
l, d = path.split('/'), []
|
||||
while len(l):
|
||||
d.append(l.pop(0))
|
||||
if not self.fs.exists('/'.join(d)):
|
||||
self.fs.mkdir('/'.join(d), 0, 0, 4096, f.mode, f.mtime)
|
||||
|
||||
|
||||
def call(self):
|
||||
"""
|
||||
"""
|
||||
if len(self.args) < 2:
|
||||
self.write('tar: You must specify one of the `-Acdtrux\' options\n')
|
||||
self.write('Try `tar --help\' or `tar --usage\' for more information.\n')
|
||||
|
||||
Reference in New Issue
Block a user