Skip to content

Commit 8d9092b

Browse files
committed
feat: hook in background thread and log process events hook address
1 parent ddd15d8 commit 8d9092b

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/hooks/process_event.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ pub unsafe fn hook_process_event() {
9292
return;
9393
};
9494

95+
debug!("Found ProcessEvent @ {:#016x}", target as usize);
96+
9597
// let target = PROCESS_EVENT_OFFSET as *const u8 as *mut u8;
9698
let hook = fake_process_event as *const u8;
9799

src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ fn attach() {
4141
log_panics::init();
4242

4343
// Apply hooks
44-
unsafe { hooks::apply_hooks() };
44+
std::thread::spawn(|| {
45+
unsafe { hooks::apply_hooks() };
46+
});
4547

4648
// Load the config file
4749
let config = read_config_file();

0 commit comments

Comments
 (0)