Skip to content

Commit

Permalink
quick fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jjolano committed Nov 14, 2022
1 parent 34f650f commit 5841a42
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
21 changes: 11 additions & 10 deletions api/Shadow.m
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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/"
];

Expand Down Expand Up @@ -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"]) {
Expand Down Expand Up @@ -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"]
Expand All @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion control
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5841a42

Please sign in to comment.