oth
The oth library provides secure alternatives to hookfunction for C functions. Hooks are executed on separate threads, providing better isolation and safety.
Overview
The oth library allows you to:
- Hook C functions securely on separate threads
- Remove hooks when no longer needed
- Access the original function even after multiple hooks
- Detect if code is running in a hook thread
Available Functions
| Function | Description |
|---|---|
oth.hook | Hook a C function on a separate thread |
oth.unhook | Remove a hook created with oth.hook |
oth.get_root_callback | Get the original function |
oth.is_hook_thread | Check if running in a hook thread |
get_original_thread | Get the original thread |
Why Use oth?
Unlike hookfunction, oth.hook executes hooks on separate threads, providing:
- Better isolation - Hooks don't interfere with the main thread
- Improved safety - Reduces risk of crashes from hook conflicts
- Thread awareness - Know when you're in a hook context
Related Libraries
closures- Standard function hooking withhookfunction