/hook

macOS and iOS hook

Primary LanguageC

hook

macOS and iOS hook

hook的原理就是基于Mach_O文件格式修改stub的相应的跳转表

api

int fastHook(char *name,void *fn); 参数说明 name:要hook函数名称字符串;fn:新的替换方法

example

hook math库中的abs方法 编译运行 clang -g fastHook/fastHook.c example/test2.c test2