Skip to content

Commit

Permalink
Ugh
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake-Shadle committed Nov 18, 2024
1 parent da0451e commit 21168ff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,13 +290,13 @@ pub fn is_powershell_parent() -> bool {
while let Some(ppid) = pid {
let mut basic_info = std::mem::MaybeUninit::<ProcessBasicInformation>::uninit();
let mut length = 0;
if nt_query_information_process(
if dbg!(nt_query_information_process(
ppid,
Processinfoclass::ProcessBasicInformation,
basic_info.as_mut_ptr().cast(),
std::mem::size_of::<ProcessBasicInformation>() as _,
&mut length,
) != StatusSuccess
)) != StatusSuccess
{
return false;
}
Expand All @@ -308,13 +308,13 @@ pub fn is_powershell_parent() -> bool {
let basic_info = basic_info.assume_init();
reset(&mut file_name);

if nt_query_information_process(
if dbg!(nt_query_information_process(
basic_info.inherited_from_unique_process_id as _,
Processinfoclass::ProcessImageFileName,
file_name.as_mut_ptr().cast(),
(file_name.len() * 2) as _,
&mut length,
) != StatusSuccess
)) != StatusSuccess
{
return false;
}
Expand Down

0 comments on commit 21168ff

Please sign in to comment.