Created
March 23, 2012 13:43
-
-
Save n00neimp0rtant/2170717 to your computer and use it in GitHub Desktop.
Revisions
-
n00neimp0rtant created this gist
Mar 23, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ -(BOOL)appIsCracked { BOOL cracked = NO; NSString* bundlePath = [[NSBundle mainBundle] bundlePath]; NSString* resourcePath = [[NSBundle mainBundle] resourcePath]; NSFileManager* fileManager = [NSFileManager defaultManager]; NSDictionary* iTunesMetadata = [NSDictionary dictionaryWithContentsOfFile:[NSString stringWithFormat:@"%@/iTunesMetadata.plist", bundlePath]]; if([(NSString*)[iTunesMetadata objectForKey:@"appleId"] isEqualToString:@"[email protected]"]) cracked = YES; if(![fileManager fileExistsAtPath:[NSString stringWithFormat:@"%@/_CodeSignature", resourcePath]]) cracked = YES; if(![fileManager fileExistsAtPath:[NSString stringWithFormat:@"%@/ResourceRules.plist", resourcePath]]) cracked = YES; return cracked; }