import sys import tornado import zmq from tornado.ioloop import IOLoop from sql_injection_fsm import SQLInjectionFSM from tfw.networking.server.tfw_server import TFWServer from tfw.config import TFWENV from tfw.config.logs import logging log = logging.getLogger(__name__) if __name__ == '__main__': server = TFWServer(SQLInjectionFSM) server.listen(TFWENV.WEB_PORT) log.debug('Python version: {}'.format(sys.version[:5])) log.debug('Tornado version: {}'.format(tornado.version)) log.debug('ZeroMQ version: {}'.format(zmq.zmq_version())) log.debug('PyZMQ version: {}'.format(zmq.pyzmq_version())) log.info('Tornado application listening on port {}'.format(TFWENV.WEB_PORT)) IOLoop.instance().start()