subhook
subhook copied to clipboard
Simple hooking library for C/C++ (x86 only, 32/64-bit, no dependencies)
```"subhook_unprotect(void*, unsigned long)", referenced from: _subhook_new in subhook-02c14a.o ld: symbol(s) not found for architecture x86_64``` Command to make dylib ```g++ -dynamiclib -fPIC -v -o finalcalling.dylib finalversion.cpp /Users/~/Desktop/c/subhook-master/subhook.c -std=c++11```
This is with v0.8.1, same issue as #15 and #43. I'm hooking 42 functions in an x64 Linux binary. If I look at the output of `GetTrampoline()` on every hook...
On 64-bit Linux systems, this flag will let subhook call mmap() with MAP_FIXED_NOREPLACE to allocate trampoline code near the source function. This helps avoid relocation overflow when generating trampoline code....
Hello, I am successfully using subhook in [loadlibrary](https://github.com/taviso/loadlibrary/pull/97) so, first of all, thank you for your effort to put this project together! Recently I might have discovered a bug in...
2 byte instruction "jns 0x9" (bytes "0x79 0x07") (jump forward 7 bytes from updated IP) - using 8 bit offset), trips me up. The function I am trying to subhook_make_trampoline...
I am trying to create a trampoline to a function that in C is: ``` void foo(void) { int a, b, c; puts("foo() called"); a = random(); b = (random()...
When working on #58 I noticed subhook is broken for macos. The mprotect() call in subhook_unprotect() will keep failing with EACCES, because in latest macos versions it's not supported to...
whenever i try to build i get these errors 
 when I use subhook to hook this function, the function 'subhook_disasm' return the len of line which in red box to be 11-byte, but actually it is 7-byte. I...
Intel® Control-Flow Enforcement Technology (Intel CET) ### Problem Since 2018, compilers started placing **ENDBR** instructions at the beginning of functions/branch, making it impossible for *subhook* to make a trampoline. At...