-
Notifications
You must be signed in to change notification settings - Fork 4
/
honeywrt.tac
37 lines (31 loc) · 1.28 KB
/
honeywrt.tac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Copyright (c) 2014 Jeffery Wilkins <djcanadianjeff@gmail.com>
# Copyright (c) 2009 Upi Tamminen <desaster@gmail.com>
# See the COPYRIGHT file for more information
import sys, os
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())))
if not os.path.exists('honeywrt.cfg'):
print 'ERROR: honeywrt.cfg is missing!'
sys.exit(1)
if os.name == 'posix' and os.getuid() == 0:
print ''
# Unsure how to handle these
#from twisted.internet import reactor, defer
#from twisted.application import internet, service
#from honeywrt.core import honeypot
#from honeywrt.core.config import config
#import honeywrt.core.honeypot
#from honeywrt import core
application = service.Application("honeywrt")
#if cfg.has_option('honeypot', 'interact_enabled') and \
# cfg.get('honeypot', 'interact_enabled').lower() in \
# ('yes', 'true', 'on'):
# iport = int(cfg.get('honeypot', 'interact_port'))
# from kippo.core import interact
# from twisted.internet import protocol
# service = internet.TCPServer(iport, interact.makeInteractFactory(factory))
# service.setServiceParent(application)