diff --git a/kippo.tac b/kippo.tac index b9a82f0..337d4b8 100644 --- a/kippo.tac +++ b/kippo.tac @@ -1,14 +1,20 @@ # Copyright (c) 2009 Upi Tamminen # 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())