From 9da2db2c1a2cb96fb1944a0f42b3e6bc66a12f4a Mon Sep 17 00:00:00 2001 From: itsikkes Date: Sun, 31 Jul 2016 20:40:05 +0300 Subject: [PATCH] Switched to tornado as the webserver --- monkey_island/cc/main.py | 9 ++++++++- .../deb-package/monkey_island_pip_requirements.txt | 3 ++- monkey_island/requirements.txt | 3 ++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/monkey_island/cc/main.py b/monkey_island/cc/main.py index 1a3757b6f..999389053 100644 --- a/monkey_island/cc/main.py +++ b/monkey_island/cc/main.py @@ -296,4 +296,11 @@ api.add_resource(NewConfig, '/api/config/new') api.add_resource(MonkeyDownload, '/api/monkey/download', '/api/monkey/download/', '/api/monkey/download/') if __name__ == '__main__': - app.run(host='0.0.0.0', debug=True, ssl_context=('server.crt', 'server.key')) + from tornado.wsgi import WSGIContainer + from tornado.httpserver import HTTPServer + from tornado.ioloop import IOLoop + + http_server = HTTPServer(WSGIContainer(app), ssl_options={'certfile': 'server.crt', 'keyfile': 'server.key'}) + http_server.listen(5000) + IOLoop.instance().start() + #app.run(host='0.0.0.0', debug=False, ssl_context=('server.crt', 'server.key')) diff --git a/monkey_island/deb-package/monkey_island_pip_requirements.txt b/monkey_island/deb-package/monkey_island_pip_requirements.txt index 288aea101..bcff42515 100644 --- a/monkey_island/deb-package/monkey_island_pip_requirements.txt +++ b/monkey_island/deb-package/monkey_island_pip_requirements.txt @@ -3,4 +3,5 @@ Flask-Pymongo Flask-Restful python-dateutil impacket -pycrypto \ No newline at end of file +pycrypto +tornado \ No newline at end of file diff --git a/monkey_island/requirements.txt b/monkey_island/requirements.txt index 288aea101..bcff42515 100644 --- a/monkey_island/requirements.txt +++ b/monkey_island/requirements.txt @@ -3,4 +3,5 @@ Flask-Pymongo Flask-Restful python-dateutil impacket -pycrypto \ No newline at end of file +pycrypto +tornado \ No newline at end of file