Files
cowrie/kippo.py
desaster 29569cb639 Add ssh_port to config.py
git-svn-id: https://kippo.googlecode.com/svn/trunk@19 951d7100-d841-11de-b865-b3884708a8e2
2009-11-17 10:02:23 +00:00

30 lines
860 B
Python
Executable File

#!/usr/bin/env python
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
import config
if __name__ == "__main__":
log.startLogging(file('./log/kippo.log', 'a'))
sshFactory = Kippo.HoneyPotSSHFactory()
sshFactory.portal = portal.Portal(Kippo.HoneyPotRealm())
users = {'root': 'root'}
sshFactory.portal.registerChecker(
checkers.InMemoryUsernamePasswordDatabaseDontUse(**users))
pubKeyString, privKeyString = Kippo.getRSAKeys()
sshFactory.publicKeys = {
'ssh-rsa': keys.Key.fromString(data=pubKeyString)}
sshFactory.privateKeys = {
'ssh-rsa': keys.Key.fromString(data=privKeyString)}
reactor.listenTCP(config.ssh_port, sshFactory)
reactor.run()
# vim: set sw=4 et: