facebook / fishhook

A library that enables dynamically rebinding symbols in Mach-O binaries running on iOS.
BSD 3-Clause "New" or "Revised" License
5.19k stars 966 forks source link

How should I use fishhook in replacement of this MSHook code? #54

Closed sidBOT closed 6 years ago

sidBOT commented 6 years ago

uint64_t getRealOffset(uint64_t offset){ return _dyld_get_image_vmaddr_slide(0)+offset; }

void (update_begin)(void this); void _update_begin(void this) { update_begin(this); } MSHookFunction(((void)getRealOffset(0x10026A9AC)),(void *) _update_begin, (void**)&update_begin);

dinhvh commented 6 years ago

There's a sample code in the readme: https://github.com/facebook/fishhook/blob/master/README.md