win32 tweaks

git-svn-id: https://kippo.googlecode.com/svn/trunk@46 951d7100-d841-11de-b865-b3884708a8e2
This commit is contained in:
desaster 2009-11-22 00:49:53 +00:00
parent 0453c28c63
commit d4ad2ec46c
1 changed files with 8 additions and 8 deletions

View File

@ -1,20 +1,20 @@
# Copyright (c) 2009 Upi Tamminen <desaster@gmail.com> # Copyright (c) 2009 Upi Tamminen <desaster@gmail.com>
# See the COPYRIGHT file for more information # 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.internet import reactor, defer, default
from twisted.application import internet, service from twisted.application import internet, service
from twisted.cred import portal from twisted.cred import portal
from twisted.conch.ssh import factory, keys from twisted.conch.ssh import factory, keys
from core import honeypot from core import honeypot
import config 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 = honeypot.HoneyPotSSHFactory()
factory.portal = portal.Portal(honeypot.HoneyPotRealm()) factory.portal = portal.Portal(honeypot.HoneyPotRealm())