- Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdebug.py
More file actions
Latest commit
19 lines (17 loc) · 625 Bytes
/
Copy pathdebug.py
File metadata and controls
19 lines (17 loc) · 625 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# This debug.py is for developers.Do not run it if you just want to run exploit but not develop it.
# 删除config.ini和exp10itdb
importre
importos
importsys
fromexploitimportexecute_sql_in_db
fromexploitimportCONFIG_INI_PATH
fromexploitimportget_string_from_command
ifos.path.exists(CONFIG_INI_PATH):
db_name="exploitdb"
result=get_string_from_command("mysql")
ifre.search(r"Can't connect", result, re.I):
os.system("service mysql start")
execute_sql_in_db("drop database %s"%db_name)
#os.system("rm %s" % CONFIG_INI_PATH)
else:
print("%s not exist"%CONFIG_INI_PATH)