#import <UIKit/UIKit.h>
#import "AppDelegate.h"
#import <dlfcn.h>
#import <sys/types.h>
typedefint(*ptrace_ptr_t)(int_request,pid_t_pid,caddr_t_addr,int_data);
#if !defined(PT_DENY_ATTACH)
#define PT_DENY_ATTACH31
#endif
-(void) disable_gdb() {
void* handle =dlopen(0,RTLD_GLOBAL|RTLD_NOW);
ptrace_ptr_tptrace_ptr =dlsym(handle,"ptrace");
ptrace_ptr(PT_DENY_ATTACH,0,0,0);
dlclose(handle);
}
[self disable_gdb];
网友评论