win32 tweaks

git-svn-id: https://kippo.googlecode.com/svn/trunk@45 951d7100-d841-11de-b865-b3884708a8e2
This commit is contained in:
desaster
2009-11-22 00:05:06 +00:00
parent f6c682c8e9
commit 0453c28c63

View File

@@ -1,14 +1,20 @@
# Copyright (c) 2009 Upi Tamminen <desaster@gmail.com>
# See the COPYRIGHT file for more information
import os, sys
sys.path.insert(0, os.path.abspath(os.getcwd()))
from twisted.internet import reactor, defer, default
from twisted.application import internet, service
from twisted.cred import portal
from twisted.conch.ssh import factory, keys
from core import honeypot
import config
import sys
if sys.platform == 'win32':
import os, inspect
# this is when just running on win32
sys.path.insert(0, os.path.abspath(os.getcwd()))
# and this is when running as a service
os.chdir(os.path.dirname(inspect.getfile(inspect.currentframe())))
factory = honeypot.HoneyPotSSHFactory()
factory.portal = portal.Portal(honeypot.HoneyPotRealm())