直接调用ptrace会被拒?

APP上架中,直接调用反调试的ptrace会被苹果拒?

typedef int (*PTRACE_T)(int request, pid_t pid, caddr_t addr, int data);
static void AntiDebug_001() {
    void *handle = dlopen(NULL, RTLD_GLOBAL | RTLD_NOW);
    PTRACE_T ptrace_ptr = dlsym(handle, "ptrace");
    ptrace_ptr(PT_DENY_ATTACH, 0, 0, 0);
}

// ------------------------------------------------------------------

// runtime to get symbol address, but must link with `
// -Wl,-undefined,dynamic_lookup` or you can use `dlopen` and `dlsym`
extern int ptrace(int request, pid_t pid, caddr_t addr, int data);
static void AntiDebug_002() { ptrace(PT_DENY_ATTACH, 0, 0, 0); }

dlsym会被拒吧。这种反调试屁用没有别浪费精力了

带ptrace上传App包时,苹果会发邮件的;

好的,谢谢张总。

是的。。遇到过。

制造崩溃清除堆栈