diff --git a/kippo/commands/__init__.py b/kippo/commands/__init__.py index 01cdddf9..43592e70 100644 --- a/kippo/commands/__init__.py +++ b/kippo/commands/__init__.py @@ -11,6 +11,7 @@ __all__ = [ 'apt', 'dice', 'adduser', + 'sleep', 'last', 'fs', 'malware', diff --git a/kippo/commands/sleep.py b/kippo/commands/sleep.py new file mode 100644 index 00000000..2e43dd5f --- /dev/null +++ b/kippo/commands/sleep.py @@ -0,0 +1,24 @@ + +from twisted.internet import reactor + +from kippo.core.honeypot import HoneyPotCommand + +commands = {} + +'''sleep''' +class command_sleep(HoneyPotCommand): + def done(self): + self.exit() + + def start(self): + if len(self.args) == 1: + _time = int( self.args[0] ) + self.scheduled = reactor.callLater(_time, self.done) + else: + self.writeln('usage: sleep seconds') + self.exit() + + +commands['/bin/sleep'] = command_sleep + +# vim: set sw=4 et tw=0: diff --git a/txtcmds/bin/sleep b/txtcmds/bin/sleep deleted file mode 100644 index e69de29b..00000000