-
Notifications
You must be signed in to change notification settings - Fork 5
/
run.py
40 lines (34 loc) · 1.67 KB
/
run.py
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
38
39
40
import runners.fastwsgi_server
from system.config_load import config_dict
from runners import fastwsgi_server, flask_server, waitress_server
print('''
##################################################################
# #
# .----------------. .----------------. .----------------. #
# | .--------------. || .--------------. || .--------------. | #
# | | ______ | || | ______ | || | _________ | | #
# | | |_ __ \ | || | .' ___ | | || | |_ ___ | | | #
# | | | |__) | | || | / .' \_| | || | | |_ \_| | | #
# | | | ___/ | || | | | | || | | _| | | #
# | | _| |_ | || | \ `.___.'\ | || | _| |_ | | #
# | | |_____| | || | `._____.' | || | |_____| | | #
# | | | || | | || | | | #
# | '--------------' || '--------------' || '--------------' | #
# '----------------' '----------------' '----------------' #
# #
# https://gitlab.com/invuls/pentest-projects/pcf #
# #
##################################################################''')
config = config_dict()
run_func = None
if config['main']['web_engine'] == 'flask':
run_func = flask_server.start_server
elif config['main']['web_engine'] == 'waitress':
run_func = waitress_server.start_server
elif config['main']['web_engine'] == 'fastwsgi':
run_func = fastwsgi_server.start_server
else:
print("Parameter 'web_engine' was not recognized!")
exit(-1)
# starting server
run_func()