mirror of
https://github.com/aljazceru/cowrie.git
synced 2025-12-18 06:24:20 +01:00
New command: history
git-svn-id: https://kippo.googlecode.com/svn/trunk@83 951d7100-d841-11de-b865-b3884708a8e2
This commit is contained in:
@@ -281,16 +281,26 @@ class command_reboot(HoneyPotCommand):
|
|||||||
self.writeln('Connection to server closed.')
|
self.writeln('Connection to server closed.')
|
||||||
self.honeypot.hostname = 'localhost'
|
self.honeypot.hostname = 'localhost'
|
||||||
self.exit()
|
self.exit()
|
||||||
|
|
||||||
commands['/sbin/reboot'] = command_reboot
|
commands['/sbin/reboot'] = command_reboot
|
||||||
|
|
||||||
|
class command_history(HoneyPotCommand):
|
||||||
|
def call(self):
|
||||||
|
if len(self.args) and self.args[0] == '-c':
|
||||||
|
self.honeypot.historyLines = []
|
||||||
|
self.honeypot.historyPosition = 0
|
||||||
|
return
|
||||||
|
count = 1
|
||||||
|
for l in self.honeypot.historyLines:
|
||||||
|
self.writeln(' %s %s' % (str(count).rjust(4), l))
|
||||||
|
count += 1
|
||||||
|
commands['history'] = command_history
|
||||||
|
|
||||||
class command_nop(HoneyPotCommand):
|
class command_nop(HoneyPotCommand):
|
||||||
def call(self):
|
def call(self):
|
||||||
pass
|
pass
|
||||||
commands['/bin/chmod'] = command_nop
|
commands['/bin/chmod'] = command_nop
|
||||||
commands['set'] = command_nop
|
commands['set'] = command_nop
|
||||||
commands['unset'] = command_nop
|
commands['unset'] = command_nop
|
||||||
commands['history'] = command_nop
|
|
||||||
commands['export'] = command_nop
|
commands['export'] = command_nop
|
||||||
commands['/bin/bash'] = command_nop
|
commands['/bin/bash'] = command_nop
|
||||||
commands['/bin/sh'] = command_nop
|
commands['/bin/sh'] = command_nop
|
||||||
|
|||||||
Reference in New Issue
Block a user