Permalink
Browse files

Removed debugger attachment prevention

  • Loading branch information...
lmirosevic committed Oct 13, 2015
1 parent 7bf52fa commit 6cd971aaf75b385dd37ca1e30a29416d0468b6b4
Showing with 0 additions and 20 deletions.
  1. +0 −20 GBDeviceInfo/GBDeviceInfo_iOS.m
@@ -323,24 +323,4 @@ + (GBOSVersion)_osVersion {
return GBOSVersionMake(majorVersion, minorVersion, patchVersion);
}
#pragma mark - Integrity protection
#if !DEBUG
typedef int (*ptrace_ptr_t)(int _request, pid_t _pid, caddr_t _addr, int _data);
#ifndef PT_DENY_ATTACH
#define PT_DENY_ATTACH 31
#endif
static void DisableGDB() {
void *handle = dlopen(0, RTLD_GLOBAL | RTLD_NOW);
ptrace_ptr_t ptrace_ptr = dlsym(handle, "ptrace");
ptrace_ptr(PT_DENY_ATTACH, 0, 0, 0);
dlclose(handle);
}
+ (void)load {
DisableGDB();
}
#endif
@end

0 comments on commit 6cd971a

Please sign in to comment.