# This debug.py is for developers.Do not run it if you just want to run exploit but not develop it. # 删除config.ini和exp10itdb import re import os import sys from exploit import execute_sql_in_db from exploit import CONFIG_INI_PATH from exploit import get_string_from_command if os.path.exists(CONFIG_INI_PATH): db_name = "exploitdb" result = get_string_from_command("mysql") if re.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)