#line 1 "/Users/xigua/baskeball/baskeball/baskeball.xm"
#import <mach-o/dyld.h>
#import <DobbyX/dobby.h>
typedef unsigned char _BYTE;
_BYTE* (*originalMsJieCode)(const char *, unsigned long);
static _BYTE* myMsJieCode(const char *a1, unsigned long a2) {
NSLog(@"[MsJieCode] a1: %s, a2: %lu", a1, a2);
_BYTE* result = originalMsJieCode(a1, a2);
const char *newReturnValue = "01|1081|zvxycrsakvxxdeuuuowdknceg||2024-04-10 09:46:16|||||";
result = (_BYTE *) newReturnValue;
NSLog(@"[MsJieCode] result: %s", result);
return result;
}
static __attribute__((constructor)) void _logosLocalCtor_59884cf5(int __unused argc, char __unused **argv, char __unused **envp) {
unsigned long address = _dyld_get_image_vmaddr_slide(29) + 0x2EE98;
NSLog(@"Hook address: %lx", address);
DobbyHook((void *)address, (void *)myMsJieCode, (void **)&originalMsJieCode);
}
代码如上 但是我就是hook不到 不知道为什么