This commit is contained in:
@@ -187,34 +187,156 @@ func EnumerateGUIWindows() ([]WindowInfo, map[uint32]uint32, error) {
|
||||
}
|
||||
|
||||
var systemAllowed = map[string]bool{
|
||||
"explorer.exe": true,
|
||||
"taskmgr.exe": true,
|
||||
"cmd.exe": true,
|
||||
"powershell.exe": true,
|
||||
"conhost.exe": true,
|
||||
"client.exe": true, // App Wails của ta
|
||||
"simple_care_v1.0.exe": true,
|
||||
"wails.exe": true,
|
||||
"msedgewebview2.exe": true, // WebView2 runtime của Wails
|
||||
"code.exe": true, // VSCode
|
||||
"cursor.exe": true, // Cursor
|
||||
"windsurf.exe": true, // Windsurf
|
||||
"goland.exe": true, // GoLand
|
||||
"goland64.exe": true, // GoLand
|
||||
"idea64.exe": true, // IntelliJ IDEA
|
||||
"clion64.exe": true, // CLion
|
||||
"webstorm64.exe": true, // WebStorm
|
||||
"pycharm64.exe": true, // PyCharm
|
||||
"rider64.exe": true, // Rider
|
||||
"studio64.exe": true, // Android Studio
|
||||
"eclipse.exe": true, // Eclipse
|
||||
"sublime_text.exe": true, // Sublime Text
|
||||
"notepad++.exe": true, // Notepad++
|
||||
"devenv.exe": true, // Visual Studio
|
||||
"git-bash.exe": true, // Git Bash
|
||||
"bash.exe": true, // Bash
|
||||
// ── Windows Shell & Explorer ───────────────────────────────────────────────
|
||||
"explorer.exe": true, // Windows Explorer / desktop shell
|
||||
"shellexperiencehost.exe": true, // Start menu, Action Center shell
|
||||
"startmenuexperiencehost.exe": true, // Start menu host
|
||||
"searchhost.exe": true, // Windows Search UI
|
||||
"searchapp.exe": true, // Windows Search (older)
|
||||
"searchindexer.exe": true,
|
||||
"sihost.exe": true, // Shell Infrastructure Host (taskbar, notification icons)
|
||||
"taskhostw.exe": true, // Task Host Window
|
||||
"taskbar.exe": true,
|
||||
"lockapp.exe": true, // Lock screen
|
||||
"logonui.exe": true, // Login/Logon UI
|
||||
"winlogon.exe": true, // Windows Logon Process
|
||||
"userinit.exe": true,
|
||||
"dwm.exe": true, // Desktop Window Manager — kill = black screen
|
||||
"csrss.exe": true, // Client Server Runtime — kill = BSOD
|
||||
|
||||
// ── UWP / Modern App Infrastructure ───────────────────────────────────────
|
||||
"applicationframehost.exe": true, // Host for ALL UWP apps (Camera, Calculator, Photos...)
|
||||
"runtimebroker.exe": true, // UWP permission broker
|
||||
"backgroundtaskhost.exe": true, // UWP background tasks
|
||||
"wwahost.exe": true, // Web app host
|
||||
"microsoftedgecp.exe": true, // Edge content process (older)
|
||||
"textinputhost.exe": true, // Touch keyboard / handwriting panel
|
||||
|
||||
// ── Input Methods & Language ───────────────────────────────────────────────
|
||||
"ctfmon.exe": true, // Collaborative Translation Framework — input method manager
|
||||
"chsime.exe": true, // Chinese IME
|
||||
"imetip.exe": true, // IME tip
|
||||
"imecmnt.exe": true,
|
||||
"googlepinyin.exe": true,
|
||||
"baidu.exe": true, // Baidu IME
|
||||
"openkey.exe": true, // OpenKey Vietnamese IME
|
||||
"openkey64.exe": true,
|
||||
"gotiengviet.exe": true, // GoTiengViet
|
||||
"unikeyvnt.exe": true, // Unikey
|
||||
"unikey.exe": true,
|
||||
|
||||
// ── Security / Credential / UAC ───────────────────────────────────────────
|
||||
"consent.exe": true, // UAC consent dialog — kill breaks all elevation
|
||||
"credentialuibroker.exe": true, // Credential UI
|
||||
"smartscreen.exe": true, // Windows SmartScreen
|
||||
"securityhealthsystray.exe": true, // Windows Security tray icon
|
||||
"securityhealthservice.exe": true,
|
||||
"wscsvc.exe": true,
|
||||
"msseces.exe": true, // Microsoft Security Essentials tray
|
||||
"msmpeng.exe": true, // Windows Defender engine (has no GUI but safety)
|
||||
"nisSrv.exe": true,
|
||||
"antimalware service executable": true, // Window title of Defender
|
||||
|
||||
// ── Notifications & Action Center ─────────────────────────────────────────
|
||||
"notificationplatformcontroller": true,
|
||||
|
||||
// ── System Tray / Taskbar helpers ─────────────────────────────────────────
|
||||
"systemsettings.exe": true, // Windows Settings
|
||||
"settingssynchostservice.exe": true,
|
||||
"settingssynchost.exe": true,
|
||||
"regsvc.exe": true,
|
||||
"spoolsv.exe": true,
|
||||
"tabtip.exe": true, // Touch keyboard
|
||||
"tabtip32.exe": true,
|
||||
"onedrive.exe": true, // OneDrive tray (common, safe to keep)
|
||||
"onedriveupdater.exe": true,
|
||||
|
||||
// ── Accessibility ─────────────────────────────────────────────────────────
|
||||
"narrator.exe": true,
|
||||
"magnify.exe": true,
|
||||
"osk.exe": true, // On-Screen Keyboard
|
||||
|
||||
// ── Audio ─────────────────────────────────────────────────────────────────
|
||||
"audiodg.exe": true, // Windows Audio Device Graph — kill = no sound
|
||||
"sndvol.exe": true, // Volume mixer
|
||||
"cmediaaudiocontrolpanel.exe": true, // C-Media audio panel
|
||||
|
||||
// ── Windows Update / Store ─────────────────────────────────────────────────
|
||||
"wuauclt.exe": true, // Windows Update
|
||||
"musnotifyicon.exe": true, // Update tray notification
|
||||
"windowsstore.exe": true,
|
||||
"winstore.app.exe": true,
|
||||
|
||||
// ── Drivers / Hardware UI ──────────────────────────────────────────────────
|
||||
"nvdisplay.container.exe": true, // NVIDIA display container
|
||||
"nvcontainer.exe": true,
|
||||
"nvinject.exe": true,
|
||||
"nvtelemetrycontainer.exe": true,
|
||||
"nvvsvc.exe": true,
|
||||
"nvspcaps64.exe": true,
|
||||
"geforce experience.exe": true,
|
||||
"radeonsoftware.exe": true, // AMD Radeon Software
|
||||
"amddvr.exe": true,
|
||||
"igfxtray.exe": true, // Intel graphics tray
|
||||
"igfxem.exe": true,
|
||||
"igfxhk.exe": true,
|
||||
"hkcmd.exe": true,
|
||||
"atk hub.exe": true, // ASUS ATK
|
||||
"atkex.exe": true,
|
||||
"asusoptimization.exe": true,
|
||||
|
||||
// ── Antivirus trays (common, prevent false-kill) ───────────────────────────
|
||||
"avastui.exe": true,
|
||||
"avgui.exe": true,
|
||||
"mbam.exe": true, // Malwarebytes
|
||||
"mbamtray.exe": true,
|
||||
"bdagent.exe": true, // Bitdefender
|
||||
"uiseagnt.exe": true, // Trend Micro
|
||||
"eguiproxy.exe": true, // ESET
|
||||
|
||||
// ── Task Manager & System tools ────────────────────────────────────────────
|
||||
"taskmgr.exe": true,
|
||||
"resmon.exe": true, // Resource Monitor
|
||||
"perfmon.exe": true,
|
||||
"mmc.exe": true, // Management Console
|
||||
|
||||
// ── Terminal / Shell ───────────────────────────────────────────────────────
|
||||
"cmd.exe": true,
|
||||
"powershell.exe": true,
|
||||
"pwsh.exe": true, // PowerShell Core
|
||||
"conhost.exe": true, // Console Host
|
||||
"windowsterminal.exe": true, // Windows Terminal
|
||||
"wt.exe": true,
|
||||
"bash.exe": true,
|
||||
"git-bash.exe": true,
|
||||
"mintty.exe": true, // Git Bash window
|
||||
"wsl.exe": true,
|
||||
"wslhost.exe": true,
|
||||
|
||||
// ── Our app + IDE/dev tools ────────────────────────────────────────────────
|
||||
"client.exe": true,
|
||||
"simple_care_v1.0.exe": true,
|
||||
"simple_care.exe": true,
|
||||
"wails.exe": true,
|
||||
"msedgewebview2.exe": true, // WebView2 runtime (Wails renderer)
|
||||
"code.exe": true,
|
||||
"cursor.exe": true,
|
||||
"windsurf.exe": true,
|
||||
"goland.exe": true,
|
||||
"goland64.exe": true,
|
||||
"idea64.exe": true,
|
||||
"clion64.exe": true,
|
||||
"webstorm64.exe": true,
|
||||
"pycharm64.exe": true,
|
||||
"rider64.exe": true,
|
||||
"studio64.exe": true,
|
||||
"eclipse.exe": true,
|
||||
"sublime_text.exe": true,
|
||||
"notepad++.exe": true,
|
||||
"devenv.exe": true,
|
||||
}
|
||||
|
||||
|
||||
func isDescendant(pid, targetPid uint32, parentMap map[uint32]uint32) bool {
|
||||
curr := pid
|
||||
for i := 0; i < 16; i++ {
|
||||
|
||||
Reference in New Issue
Block a user