mirror of https://github.com/cowrie/cowrie.git
add working sleep command
This commit is contained in:
parent
6b07bb2784
commit
5ed7b390d3
|
@ -11,6 +11,7 @@ __all__ = [
|
|||
'apt',
|
||||
'dice',
|
||||
'adduser',
|
||||
'sleep',
|
||||
'last',
|
||||
'fs',
|
||||
'malware',
|
||||
|
|
|
@ -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:
|
Loading…
Reference in New Issue