mirror of
https://github.com/aljazceru/cowrie.git
synced 2026-02-19 13:24:27 +01:00
Revert command module loading change until fixed
git-svn-id: https://kippo.googlecode.com/svn/trunk@151 951d7100-d841-11de-b865-b3884708a8e2
This commit is contained in:
14
kippo/commands/__init__.py
Normal file
14
kippo/commands/__init__.py
Normal file
@@ -0,0 +1,14 @@
|
||||
# Copyright (c) 2009 Upi Tamminen <desaster@gmail.com>
|
||||
# See the COPYRIGHT file for more information
|
||||
|
||||
__all__ = [
|
||||
'base',
|
||||
'ls',
|
||||
'ping',
|
||||
'ssh',
|
||||
'tar',
|
||||
'wget',
|
||||
'apt',
|
||||
'dice',
|
||||
'adduser',
|
||||
]
|
||||
@@ -375,9 +375,7 @@ class HoneyPotEnvironment(object):
|
||||
self.cfg = config()
|
||||
self.commands = {}
|
||||
import kippo.commands
|
||||
modules = [x[:-3] for x in os.listdir('kippo/commands') if \
|
||||
x.endswith('.py') and x[0] not in '._']
|
||||
for c in modules:
|
||||
for c in kippo.commands.__all__:
|
||||
module = __import__('kippo.commands.%s' % c,
|
||||
globals(), locals(), ['commands'])
|
||||
self.commands.update(module.commands)
|
||||
|
||||
Reference in New Issue
Block a user