- Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathweb.py
More file actions
Latest commit
20 lines (16 loc) · 696 Bytes
/
Copy pathweb.py
File metadata and controls
20 lines (16 loc) · 696 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
importre
importos
fromexp10itimportupdate_config_file_key_value
fromexploitimportCONFIG_INI_PATH
withopen(CONFIG_INI_PATH, 'r+') asf:
content=f.read()
#下面用于设置web后台口令及将web后台相关表[session机制,登录数据等属于django功能中要建立的表]存储到数据库
#os.chdir("pannel")
ifre.search(r"finish_web_setting", content):
pass
else:
os.system("pip3 install Django==1.10.3")
os.system("python3 pannel/manage.py migrate")
os.system("python3 pannel/manage.py createsuperuser")
update_config_file_key_value(CONFIG_INI_PATH, 'default', 'finish_web_setting', 1)
os.system("python3 pannel/manage.py runserver 0.0.0.0:8000")