Skip to content

Basic x86 trampoline hook implemented in Zig. Windows only.

License

Notifications You must be signed in to change notification settings

xxhertz/zig-trampoline-hook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

To get started:

// Import the library
const hooking = @import("trampoline");
// Initialize the library at runtime
hooking.init(allocator);
// Hook a function
original_func = @ptrCast(hooking.trampoline_hook(&func_to_hook, &hook_to_run, 5));
// If you're unsure what 5 means here, you should probably research what a trampoline hook is.
// Or don't. I don't care. Trial and error has a 10% success rate here.
// Release all hooks
hooking.deinit();

main.zig contains an example

About

Basic x86 trampoline hook implemented in Zig. Windows only.

Resources

License

Stars

Watchers

Forks

Contributors

Languages