diff --git a/api/Shadow.m b/api/Shadow.m index 41df293..d7a4f13 100644 --- a/api/Shadow.m +++ b/api/Shadow.m @@ -187,6 +187,7 @@ + (BOOL)isPathHardRestricted:(NSString *)path { @"/var/db/stash", @"/var/binpack", @"/var/checkra1n.dmg", + @"/var/mobile/Library/Application Support/Containers/", @"/var/mobile/Library/Application Support/xyz.willy", @"/var/mobile/Library/Cachespayment", @"/var/mobile/Library/Filza", @@ -231,8 +232,7 @@ + (BOOL)isPathHardRestricted:(NSString *)path { @"/Library/Application Support/", @"/var/log/", @"/System/Library/LaunchDaemons/", - @"/var/lib/cydia", - @"/var/lib/apt", + @"/var/lib/", @"/var/cache/" ]; @@ -326,10 +326,11 @@ - (BOOL)isPathRestricted:(NSString *)path resolve:(BOOL)resolve { // Process path string from XPC (since we have hooked methods) if(resolve) { path = [self resolvePath:path]; + } - if(![path isAbsolutePath]) { - path = [[[NSFileManager defaultManager] currentDirectoryPath] stringByAppendingPathComponent:path]; - } + if(![path isAbsolutePath]) { + // path = [[[NSFileManager defaultManager] currentDirectoryPath] stringByAppendingPathComponent:path]; + return NO; } if([path hasPrefix:@"/private/var"] || [path hasPrefix:@"/private/etc"]) { @@ -362,11 +363,6 @@ - (BOOL)isPathRestricted:(NSString *)path resolve:(BOOL)resolve { return NO; } - // Check if path is hard restricted - if([Shadow isPathHardRestricted:path]) { - return YES; - } - if([path hasPrefix:bundlePath] || ([path hasPrefix:homePath] && ![homePath isEqualToString:realHomePath]) || [path hasPrefix:@"/System"] @@ -375,6 +371,11 @@ - (BOOL)isPathRestricted:(NSString *)path resolve:(BOOL)resolve { return NO; } + // Check if path is hard restricted + if([Shadow isPathHardRestricted:path]) { + return YES; + } + if(!center) { return NO; } diff --git a/control b/control index fc4c3d1..3757362 100644 --- a/control +++ b/control @@ -2,7 +2,7 @@ Package: me.jjolano.shadow Name: Shadow Depends: firmware (>= 7.0), mobilesubstrate, dpkg, com.opa334.altlist, ws.hbang.common Recommends: com.rpetrich.rocketbootstrap -Version: 3.0-0.rc5 +Version: 3.0-0.rc6 Architecture: iphoneos-arm Description: A modern jailbreak detection bypass for jailbroken iOS. Maintainer: jjolano