From 3fa6c3bd1c5816bccacc10673f9e9d732ce85e05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Victor?= Date: Thu, 8 Aug 2024 13:46:44 -0300 Subject: [PATCH] Update .gitignore --- client/src/injection.rs | 12 +++++++----- driver/.gitignore | 3 +-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/client/src/injection.rs b/client/src/injection.rs index 113d444..d150905 100644 --- a/client/src/injection.rs +++ b/client/src/injection.rs @@ -1,9 +1,5 @@ use { - core::ffi::c_void, - crate::driver::open_driver, - shared::structs::TargetInjection, - std::ptr::null_mut, - windows_sys::Win32::{Foundation::CloseHandle, System::IO::DeviceIoControl} + crate::{driver::open_driver, utils::check_file}, core::ffi::c_void, shared::structs::TargetInjection, std::ptr::null_mut, windows_sys::Win32::{Foundation::CloseHandle, System::IO::DeviceIoControl} }; pub fn injection_thread(ioctl_code: u32, pid: &u32, path: &String) { @@ -13,6 +9,12 @@ pub fn injection_thread(ioctl_code: u32, pid: &u32, path: &String) { path: path.to_string(), pid: *pid as usize }; + + if !check_file(path) { + eprintln!("File not found: {path}"); + return; + } + let mut return_buffer = 0; status = unsafe { DeviceIoControl( diff --git a/driver/.gitignore b/driver/.gitignore index 2b35a94..88c714b 100644 --- a/driver/.gitignore +++ b/driver/.gitignore @@ -1,3 +1,2 @@ /target -/src/backup -/src/memory \ No newline at end of file +/src/backup \ No newline at end of file