fix is_protect_pid par

This commit is contained in:
2026-06-03 14:10:48 +08:00
parent 9c5e70227f
commit e5df79f297
2 changed files with 14 additions and 4 deletions
+13 -3
View File
@@ -36,7 +36,7 @@ namespace protect_filter
return TRUE; return TRUE;
} }
auto is_protect_pid(ULONG Pid) -> BOOL auto is_protect_pid(ULONG Pid, PEPROCESS Eprocess)->BOOL
{ {
UNREFERENCED_PARAMETER(Pid); UNREFERENCED_PARAMETER(Pid);
if (IsListEmpty(&g_protect_list)) if (IsListEmpty(&g_protect_list))
@@ -48,8 +48,18 @@ 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;
if (list_data->Pid == Pid)
return TRUE; if (Pid)
{
if (list_data->Pid == Pid)
return TRUE;
}
if (Eprocess)
{
if (list_data->Eprocess == Eprocess)
return TRUE;
}
//DbgPrintEx(77, 0, "[+] pid:%d | eproecss:%p\n", list_data->Pid, list_data->Eprocess); //DbgPrintEx(77, 0, "[+] pid:%d | eproecss:%p\n", list_data->Pid, list_data->Eprocess);
} }
+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) -> BOOL; auto is_protect_pid(ULONG Pid, PEPROCESS Eprocess) -> BOOL;
auto remove_list(ULONG Pid, HWND hwnd)->BOOL; auto remove_list(ULONG Pid, HWND hwnd)->BOOL;
} }