diff --git a/kippo/commands/__init__.py b/kippo/commands/__init__.py deleted file mode 100644 index 6232efa..0000000 --- a/kippo/commands/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) 2009 Upi Tamminen -# See the COPYRIGHT file for more information - -__all__ = [ - 'base', - 'ls', - 'ping', - 'ssh', - 'tar', - 'wget', - 'apt', - 'dice', - 'adduser', - 'last', - ] diff --git a/kippo/core/honeypot.py b/kippo/core/honeypot.py index 447d2bb..e9687ca 100644 --- a/kippo/core/honeypot.py +++ b/kippo/core/honeypot.py @@ -375,7 +375,9 @@ class HoneyPotEnvironment(object): self.cfg = config() self.commands = {} import kippo.commands - for c in kippo.commands.__all__: + modules = [x[:-3] for x in os.listdir('kippo/commands') if \ + x.endswith('.py') and x[0] not in '._'] + for c in modules: module = __import__('kippo.commands.%s' % c, globals(), locals(), ['commands']) self.commands.update(module.commands)