Private
Public Access
1
0
Files
Kordophone/server/agentHook/agentHook.m

20 lines
719 B
Mathematica
Raw Normal View History

2018-11-13 22:39:03 -08:00
#import <mach/message.h>
#import <Foundation/Foundation.h>
#include <dlfcn.h>
#define DYLD_INTERPOSE(_replacment,_replacee) \
__attribute__((used)) static struct{ const void* replacment; const void* replacee; } _interpose_##_replacee \
__attribute__ ((section ("__DATA,__interpose"))) = { (const void*)(unsigned long)&_replacment, (const void*)(unsigned long)&_replacee };
BOOL IMDAuditTokenTaskHasEntitlement(audit_token_t *auditToken, NSString *entitlement);
BOOL replacement__IMDAuditTokenTaskHasEntitlement(audit_token_t *auditToken, NSString *entitlement)
{
// Bypass all entitlement checks
return YES;
}
DYLD_INTERPOSE(replacement__IMDAuditTokenTaskHasEntitlement, IMDAuditTokenTaskHasEntitlement);