Moved some static commands to txtcmds/

git-svn-id: https://kippo.googlecode.com/svn/trunk@99 951d7100-d841-11de-b865-b3884708a8e2
This commit is contained in:
desaster
2010-04-06 15:48:40 +00:00
parent daa46a05fc
commit 48ecc25cc6
3 changed files with 8 additions and 21 deletions

View File

@ -151,11 +151,6 @@ class command_clear(HoneyPotCommand):
self.honeypot.terminal.reset() self.honeypot.terminal.reset()
commands['/usr/bin/clear'] = command_clear commands['/usr/bin/clear'] = command_clear
class command_vi(HoneyPotCommand):
def call(self):
self.writeln('E558: Terminal entry not found in terminfo')
commands['/usr/bin/vi'] = command_vi
class command_hostname(HoneyPotCommand): class command_hostname(HoneyPotCommand):
def call(self): def call(self):
self.writeln(self.honeypot.hostname) self.writeln(self.honeypot.hostname)
@ -224,22 +219,6 @@ class command_id(HoneyPotCommand):
self.writeln('uid=0(root) gid=0(root) groups=0(root)') self.writeln('uid=0(root) gid=0(root) groups=0(root)')
commands['/usr/bin/id'] = command_id commands['/usr/bin/id'] = command_id
class command_mount(HoneyPotCommand):
def call(self):
if self.args and len(self.args[0].strip()):
return
for i in [
'/dev/sda1 on / type ext3 (rw,errors=remount-ro)',
'tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)',
'proc on /proc type proc (rw,noexec,nosuid,nodev)',
'sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)',
'udev on /dev type tmpfs (rw,mode=0755)',
'tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)',
'devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)',
]:
self.writeln(i)
commands['/usr/mount'] = command_mount
class command_pwd(HoneyPotCommand): class command_pwd(HoneyPotCommand):
def call(self): def call(self):
self.writeln(self.honeypot.cwd) self.writeln(self.honeypot.cwd)

7
txtcmds/bin/mount Normal file
View File

@ -0,0 +1,7 @@
/dev/sda1 on / type ext3 (rw,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)

1
txtcmds/bin/vi Normal file
View File

@ -0,0 +1 @@
E558: Terminal entry not found in terminfo