getsectdatafromFramework
- 所属头文件:
getsect.h
- 定义
extern char *getsectdatafromFramework(
const char *FrameworkName,
const char *segname,
const char *sectname,
unsigned long *size);
Hook代码
#import "mach-o/getsect.h"
#import <dlfcn.h>
#import <mach-o/dyld.h>
#import "objc/runtime.h"
char* getsectdatafromFramework(const char *FrameworkName, const char *segname, const char *sectname, unsigned long *size);
%hookf(char *, getsectdatafromFramework, const char *FrameworkName, const char *segname, const char *sectname, unsigned long *size){
char* sectDataFrameworkStr = %orig;
iosLogInfo("FrameworkName=%{public}s,segname=%{public}s,sectname=%{public}s,*size=%lu -> sectDataFrameworkStr=%s", FrameworkName, segname, sectname, *size, sectDataFrameworkStr);
return sectDataFrameworkStr;
}