From 1dd617d65be3cb91c3419cd50f157477621f2410 Mon Sep 17 00:00:00 2001 From: pozm <44528100+pozm@users.noreply.github.com> Date: Sun, 11 Feb 2024 17:35:51 +0000 Subject: [PATCH] commit changes --- gdkeinj/src/lib.rs | 4 +++- src/lib.rs | 11 ++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/gdkeinj/src/lib.rs b/gdkeinj/src/lib.rs index 8f76169..031afc7 100644 --- a/gdkeinj/src/lib.rs +++ b/gdkeinj/src/lib.rs @@ -14,7 +14,8 @@ static_detour! { pub static OpenAndParse: unsafe extern "fastcall" fn(*const i32, *const i32, *const u8, bool) -> (); } -#[poggers_derive::create_entry(no_free)] +#[cfg_attr(debug_assertions, poggers_derive::create_entry)] +#[cfg_attr(not(debug_assertions), poggers_derive::create_entry(no_console))] pub fn main() { let mut sigs = HashMap::::new(); sigs.insert( @@ -54,6 +55,7 @@ pub fn main() { let ptr_to_key = (key as usize + 8) as *const *const u8; std::ptr::copy(*ptr_to_key, read_key.as_mut_ptr(), 32); sock2.send(read_key.as_slice()); + // panic!("good ridance.") }) .unwrap(); opp.enable(); diff --git a/src/lib.rs b/src/lib.rs index baccfbe..c2fbd45 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -102,7 +102,16 @@ pub unsafe fn spawn_and_inject(proc: &str) { { let target = OwnedProcess::from_pid(proc.get_pid()).unwrap(); let syrnge = Syringe::for_process(target); - let injmod = syrnge.inject("./target/debug/gdkeinj.dll").unwrap(); + let injmod = syrnge + .inject(format!( + "./target/{}/gdkeinj.dll", + if cfg!(debug_assertions) { + "debug" + } else { + "release" + } + )) + .unwrap(); println!("waiting until udp is ok ");