From d4ad2ec46c6cc1b4496c83e89faeb5c81ad759c8 Mon Sep 17 00:00:00 2001 From: desaster Date: Sun, 22 Nov 2009 00:49:53 +0000 Subject: [PATCH] win32 tweaks git-svn-id: https://kippo.googlecode.com/svn/trunk@46 951d7100-d841-11de-b865-b3884708a8e2 --- kippo.tac | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/kippo.tac b/kippo.tac index 337d4b8..e204ee7 100644 --- a/kippo.tac +++ b/kippo.tac @@ -1,20 +1,20 @@ # Copyright (c) 2009 Upi Tamminen # See the COPYRIGHT file for more information +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()))) + 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())