monkey island can now be run from both monkey_island.py and run_cc.bat

This commit is contained in:
Itay Mizeretz 2018-06-13 15:40:13 +03:00
parent 4e207256dd
commit 36230fa25c
3 changed files with 10 additions and 2 deletions

4
monkey/monkey_island.py Normal file
View File

@ -0,0 +1,4 @@
import monkey_island.cc.main
if "__main__" == __name__:
monkey_island.cc.main.main()

View File

@ -14,7 +14,8 @@ from cc.utils import local_ip_addresses
from cc.environment.environment import env
from cc.database import is_db_server_up
if __name__ == '__main__':
def main():
from tornado.wsgi import WSGIContainer
from tornado.httpserver import HTTPServer
from tornado.ioloop import IOLoop
@ -36,3 +37,6 @@ if __name__ == '__main__':
print('Monkey Island Server is running on https://{}:{}'.format(local_ip_addresses()[0], env.get_island_port()))
IOLoop.instance().start()
if __name__ == '__main__':
main()

View File

@ -1,4 +1,4 @@
@title C^&C Server
@pushd ..
@monkey_island\bin\Python27\python monkey_island\cc\main.py
@monkey_island\bin\Python27\python monkey_island.py
@popd