Hi i am hooking sysctl on ios 15, i have problem after hooking, imei code disappears, sim and mobile network service lose connection, can anyone help me!
Here is code Objective C++ and Logos:
int (* original_sysctl)(const int *name, u_int namelen, void *oldp, size_t *oldlenp, const void *newp, size_t newlen);
static int replaced_sysctl(const int *name, u_int namelen, void *oldp, size_t *oldlenp, const void *newp, size_t newlen) {
int result = original_sysctl(name, namelen, oldp, oldlenp, newp, newlen);
return result;
}
%ctor {
MSHookFunction(sysctl, (void*)replaced_sysctl, (void **)&original_sysctl);
}
Has anyone encountered this problem and had a solution, please help me, thanks a lot