@lorndragon wrote:
以下代码取自 http://www.alonemonkey.com/2018/02/03/unity-reverse-ios/
请问一下各位大大, 在非越狱的环境下, 这种基于地址的C函数hook, 可以实现吗? 如何实现?#import <substrate.h> #import <dlfcn.h> #import <mach-o/dyld.h> int (*old_clover_point_stock)(void); int new_clover_point_stock(void) { return 9999; } %ctor { @autoreleasepool { unsigned long clover_point_stock = _dyld_get_image_vmaddr_slide(0) + 0x100093A2C; MSHookFunction((void *)clover_point_stock, (void *)&new_clover_point_stock, (void **)&old_clover_point_stock); } }
Posts: 7
Participants: 4