fix is_protect_pid function if pid

This commit is contained in:
2026-06-03 10:29:54 +08:00
parent a514b17148
commit b6aa2891ab
2 changed files with 5 additions and 4 deletions
+4 -3
View File
@@ -36,7 +36,7 @@ namespace protect_filter
return TRUE; return TRUE;
} }
auto is_protect_pid(ULONG Pid) -> ULONG auto is_protect_pid(ULONG Pid) -> BOOL
{ {
UNREFERENCED_PARAMETER(Pid); UNREFERENCED_PARAMETER(Pid);
if (IsListEmpty(&g_protect_list)) if (IsListEmpty(&g_protect_list))
@@ -48,9 +48,10 @@ namespace protect_filter
auto list_data = reinterpret_cast<PFILTER>(CONTAINING_RECORD(list_head, FILTER, List)); auto list_data = reinterpret_cast<PFILTER>(CONTAINING_RECORD(list_head, FILTER, List));
list_head = list_head->Flink; list_head = list_head->Flink;
DbgPrintEx(77, 0, "[+] pid:%d | eproecss:%p\n", list_data->Pid, list_data->Eprocess); if (list_data->Pid == Pid)
return TRUE;
//DbgPrintEx(77, 0, "[+] pid:%d | eproecss:%p\n", list_data->Pid, list_data->Eprocess);
} }
return NULL; return NULL;
+1 -1
View File
@@ -15,7 +15,7 @@ namespace protect_filter
auto add_list(ULONG Pid, HWND hwnd)->BOOL; auto add_list(ULONG Pid, HWND hwnd)->BOOL;
auto is_protect_pid(ULONG Pid)->ULONG; auto is_protect_pid(ULONG Pid) -> BOOL;
auto remove_list(ULONG Pid, HWND hwnd)->BOOL; auto remove_list(ULONG Pid, HWND hwnd)->BOOL;
} }