Skip to content
Permalink
Browse files

iOS 8 fix

  • Loading branch information...
hotsjf
hotsjf committed Nov 3, 2014
1 parent 12ba986 commit bc0db5bbd025be8ad7a31d95c57137ed90a120b6
Showing with 42 additions and 6 deletions.
  1. +8 −4 Classes/Cracker.m
  2. +34 −2 Classes/izip.m
@@ -203,7 +203,7 @@ -(BOOL) execute

Binary *pluginBinary = [[Binary alloc] initWithBinary:[plugin.pluginPath stringByAppendingString:plugin.pluginExecutableName]];

NSString *tempPluginBinaryPath = [_workingDir stringByAppendingFormat:@"/PlugIns/%@", plugin.pluginExecutableName];
NSString *tempPluginBinaryPath = [_workingDir stringByAppendingFormat:@"/PlugIns/%@/%@", [plugin.pluginPath lastPathComponent] ,plugin.pluginExecutableName];
NSError *error;

printf("dumping: attempting to crack plugin: %s\n", plugin.pluginName.UTF8String);
@@ -444,7 +444,11 @@ void generateMetadata(NSString *origPath,NSString *output)

NSMutableDictionary *metadataPlist = [NSMutableDictionary dictionaryWithContentsOfFile:origPath];

NSDictionary *censorList = [NSDictionary dictionaryWithObjectsAndKeys:fake_email, @"appleId", fake_purchase_date, @"purchaseDate", @"", @"userName", nil];
NSDictionary *censorList = [NSDictionary dictionaryWithObjectsAndKeys:
fake_email, @"appleId",
fake_purchase_date, @"purchaseDate",
@"", @"userName",
nil];

if ([[Preferences sharedInstance] boolForKey:@"CheckMetadata"])
{
@@ -486,8 +490,8 @@ void generateMetadata(NSString *origPath,NSString *output)
@"", @"product-type",
@"", @"is-purchased-redownload",
@"", @"asset-info",
@"", @"bundleDisplayName",
nil];
@"", @"bundleDisplayName",
nil];
for (id plistItem in metadataPlist)
{
if (([noCensorList objectForKey:plistItem] == nil) && ([censorList objectForKey:plistItem] == nil))
@@ -85,9 +85,16 @@ - (void) zipOriginal:(NSOperation*) operation
NSString *fullPath;
[theURL getResourceValue:&fullPath forKey:NSURLPathKey error:NULL];

//NSLog(@"++++++++++++++++>%@",fullPath);

NSMutableArray *comp = [NSMutableArray arrayWithArray:[fullPath pathComponents]];

[comp removeObjectsAtIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, 5)]];
//fix iOS 8 bug
if ([UIDevice currentDevice].systemVersion.floatValue >= 8.0){
[comp removeObjectsAtIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, 8)]];
}else{
[comp removeObjectsAtIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, 5)]];
}

if (comp.count > 1)
{
@@ -104,6 +111,8 @@ - (void) zipOriginal:(NSOperation*) operation
[aNewPath appendFormat:@"%@%@",i==0?@"":@"/",comp[i]];
}

//NSLog(@"==============>%@",aNewPath);

[subpaths addObject:aNewPath];

[aNewPath release];
@@ -115,10 +124,33 @@ - (void) zipOriginal:(NSOperation*) operation
for(NSString *path in subpaths)
{

if ([path hasPrefix:[appGUID stringByAppendingPathComponent:@"Documents"]]||[path hasPrefix:[appGUID stringByAppendingPathComponent:@"Library"]]||[path hasPrefix:[appGUID stringByAppendingPathComponent:@"tmp"]]||([path rangeOfString:@"SC_Info"].location != NSNotFound)||[path hasSuffix:binary])
//NSLog(@"------------------>%@",path);

if ([path hasPrefix:[appGUID stringByAppendingPathComponent:@"Documents"]]||
[path hasPrefix:[appGUID stringByAppendingPathComponent:@"Library"]]||
[path hasPrefix:[appGUID stringByAppendingPathComponent:@"tmp"]]||
([path rangeOfString:@"SC_Info"].location != NSNotFound)||
[path isEqualToString:@"iTunesArtwork"] ||
[path isEqualToString:@"iTunesMetadata.plist"] ||
[path hasSuffix:binary]
)
{
continue;
}
//check plugin
if (_cracker->_app.hasPlugin) {
BOOL should_continue = NO;
NSArray *pa = _cracker->_app.plugins;
for (Plugin *p in pa ) {
if ([path hasSuffix:p.pluginExecutableName]) {
should_continue = YES;
break;
}
}
if (should_continue) {
continue;
}
}

NSString *longPath = [folder stringByAppendingPathComponent:path];

0 comments on commit bc0db5b

Please sign in to comment.
You can’t perform that action at this time.