Enable twisted logging

Add command: pwd


git-svn-id: https://kippo.googlecode.com/svn/trunk@2 951d7100-d841-11de-b865-b3884708a8e2
This commit is contained in:
desaster
2009-11-10 19:36:03 +00:00
parent 2954787fd7
commit 0b10cb470e
3 changed files with 7 additions and 0 deletions

View File

@ -100,6 +100,9 @@ class command_mount(HoneyPotCommand):
]:
self.honeypot.writeln(i)
class command_pwd(HoneyPotCommand):
def call(self, args):
self.honeypot.writeln(self.honeypot.cwd)
class command_nop(HoneyPotCommand):
def call(self, args):

View File

@ -14,6 +14,7 @@ cmdl = {
'/usr/bin/vi': base.command_vi,
'/usr/bin/vim': base.command_vi,
'/bin/mount': base.command_mount,
'/bin/pwd': base.command_pwd,
'/bin/ls': ls.command_ls,
'/usr/bin/wget': wget.command_wget,
'/bin/tar': tar.command_tar,

View File

@ -3,9 +3,12 @@
from twisted.cred import portal, checkers
from twisted.conch.ssh import factory, keys
from twisted.internet import reactor
from twisted.python import log
from core import Kippo
if __name__ == "__main__":
log.startLogging(file('./log/kippo.log', 'w'))
sshFactory = factory.SSHFactory()
sshFactory.portal = portal.Portal(Kippo.HoneyPotRealm())