mirror of
https://github.com/aljazceru/cowrie.git
synced 2026-02-21 22:34:24 +01:00
add uname -r support
This commit is contained in:
@@ -13,6 +13,7 @@ __all__ = [
|
||||
'adduser',
|
||||
'sleep',
|
||||
'last',
|
||||
'uname',
|
||||
'fs',
|
||||
'malware',
|
||||
]
|
||||
|
||||
@@ -82,16 +82,6 @@ class command_hostname(HoneyPotCommand):
|
||||
self.writeln(self.honeypot.hostname)
|
||||
commands['/bin/hostname'] = command_hostname
|
||||
|
||||
class command_uname(HoneyPotCommand):
|
||||
def call(self):
|
||||
if len(self.args) and self.args[0].strip() in ('-a', '--all'):
|
||||
self.writeln(
|
||||
'Linux %s 2.6.26-2-686 #1 SMP Wed Nov 4 20:45:37 UTC 2009 i686 GNU/Linux' % \
|
||||
self.honeypot.hostname)
|
||||
else:
|
||||
self.writeln('Linux')
|
||||
commands['/bin/uname'] = command_uname
|
||||
|
||||
class command_ps(HoneyPotCommand):
|
||||
def call(self):
|
||||
user = self.honeypot.user.username
|
||||
|
||||
19
kippo/commands/uname.py
Normal file
19
kippo/commands/uname.py
Normal file
@@ -0,0 +1,19 @@
|
||||
#
|
||||
|
||||
from kippo.core.honeypot import HoneyPotCommand
|
||||
|
||||
commands = {}
|
||||
|
||||
class command_uname(HoneyPotCommand):
|
||||
def call(self):
|
||||
if len(self.args) and self.args[0].strip() in ('-a', '--all'):
|
||||
self.writeln(
|
||||
'Linux %s 2.6.26-2-686 #1 SMP Wed Nov 4 20:45:37 UTC 2009 i686 GNU/Linux' % \
|
||||
self.honeypot.hostname)
|
||||
elif len(self.args) and self.args[0].strip() in ('-r', '--kernel-release'):
|
||||
self.writeln( '2.6.26-2-686' )
|
||||
else:
|
||||
self.writeln('Linux')
|
||||
|
||||
commands['/bin/uname'] = command_uname
|
||||
|
||||
Reference in New Issue
Block a user