diff --git a/kippo/commands/__init__.py b/kippo/commands/__init__.py new file mode 100644 index 0000000..cf40a4b --- /dev/null +++ b/kippo/commands/__init__.py @@ -0,0 +1,14 @@ +# Copyright (c) 2009 Upi Tamminen +# See the COPYRIGHT file for more information + +__all__ = [ + 'base', + 'ls', + 'ping', + 'ssh', + 'tar', + 'wget', + 'apt', + 'dice', + 'adduser', + ] diff --git a/kippo/core/honeypot.py b/kippo/core/honeypot.py index e9687ca..447d2bb 100644 --- a/kippo/core/honeypot.py +++ b/kippo/core/honeypot.py @@ -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)