subhook icon indicating copy to clipboard operation
subhook copied to clipboard

Simple hooking library for C/C++ (x86 only, 32/64-bit, no dependencies)

Results 24 subhook issues
Sort by recently updated
recently updated
newest added

```"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 ![image](https://user-images.githubusercontent.com/48137608/62417462-93873600-b658-11e9-8aab-ce38b0769853.png)

![image](https://user-images.githubusercontent.com/21003439/101855045-c2db7a80-3b9d-11eb-9e8c-187a21e9bde6.png) 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...