2018-03-23 14:27:42 +00:00
|
|
|
import sys
|
|
|
|
import zmq
|
2018-03-27 15:05:27 +00:00
|
|
|
import tornado
|
2018-03-23 14:27:42 +00:00
|
|
|
from tornado.ioloop import IOLoop
|
|
|
|
|
|
|
|
from sql_injection_fsm import SQLInjectionFSM
|
|
|
|
from tfw.networking.server.tfw_server import TFWServer
|
2018-03-25 14:34:31 +00:00
|
|
|
from tfw.config import TFWENV
|
2018-03-23 14:27:42 +00:00
|
|
|
from tfw.config.logs import logging
|
|
|
|
log = logging.getLogger(__name__)
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
server = TFWServer(SQLInjectionFSM)
|
2018-03-25 14:34:31 +00:00
|
|
|
server.listen(TFWENV.WEB_PORT)
|
2018-03-23 14:27:42 +00:00
|
|
|
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()))
|
2018-03-25 14:34:31 +00:00
|
|
|
log.info('Tornado application listening on port {}'.format(TFWENV.WEB_PORT))
|
2018-03-23 14:27:42 +00:00
|
|
|
IOLoop.instance().start()
|