From 5911c9993b7880aec2e80f326587b851147fe2a4 Mon Sep 17 00:00:00 2001 From: joaoviictorti Date: Thu, 26 Sep 2024 21:17:33 -0300 Subject: [PATCH] refactor(client): changing variable names for clarity --- client/src/modules/process.rs | 4 ++-- client/src/modules/thread.rs | 4 ++-- client/src/utils.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/client/src/modules/process.rs b/client/src/modules/process.rs index 2a2407a..7b5add1 100644 --- a/client/src/modules/process.rs +++ b/client/src/modules/process.rs @@ -6,7 +6,7 @@ use { PS_PROTECTED_SIGNER, PS_PROTECTED_TYPE, }, shared::{ - vars::MAX_PIDS, + vars::MAX_PID, structs::{ EnumerateInfoInput, ProcessInfoHide, ProcessListInfo, ProcessSignature, TargetProcess, ProcessProtection @@ -120,7 +120,7 @@ impl Process { } pub fn enumerate_process(&mut self, ioctl_code: u32, option: &Options) { - let mut info_process: [ProcessListInfo; MAX_PIDS] = unsafe { std::mem::zeroed() }; + let mut info_process: [ProcessListInfo; MAX_PID] = unsafe { std::mem::zeroed() }; let mut enumeration_input = EnumerateInfoInput { options: option.to_shared(), }; diff --git a/client/src/modules/thread.rs b/client/src/modules/thread.rs index 58502eb..fcaaa47 100644 --- a/client/src/modules/thread.rs +++ b/client/src/modules/thread.rs @@ -3,7 +3,7 @@ use { log::*, shared::{ structs::{EnumerateInfoInput, TargetThread, ThreadListInfo}, - vars::MAX_TIDS, + vars::MAX_TID, }, std::{ffi::c_void, mem::size_of, ptr::null_mut}, windows_sys::Win32::{ @@ -89,7 +89,7 @@ impl Thread { pub fn enumerate_thread(self, ioctl_code: u32, option: &Options) { debug!("Attempting to open the driver for thread enumeration"); - let mut info_thread: [ThreadListInfo; MAX_TIDS] = unsafe { std::mem::zeroed() }; + let mut info_thread: [ThreadListInfo; MAX_TID] = unsafe { std::mem::zeroed() }; let mut enumeration_input = EnumerateInfoInput { options: option.to_shared(), }; diff --git a/client/src/utils.rs b/client/src/utils.rs index 05b1885..d472466 100644 --- a/client/src/utils.rs +++ b/client/src/utils.rs @@ -26,7 +26,7 @@ use { /// - `file` - A string reference representing the file path. /// /// # Returns - +/// /// - `true` if the file exists, `false` otherwise. pub fn check_file(file: &String) -> bool { let file = Path::new(file);