Skip to content

Commit

Permalink
Fix smith and physpuppet being selectable on higher 15 versions despi…
Browse files Browse the repository at this point in the history
…te being unsupported
  • Loading branch information
opa334 committed Feb 21, 2024
1 parent 8a40553 commit 2379e4b
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 27 deletions.
13 changes: 9 additions & 4 deletions Application/Dopamine/Exploits/badRecovery/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@
<dict>
<key>DPFlavorPriority</key>
<integer>1000</integer>
<key>DPHighestSupported</key>
<string>15.4.1</string>
<key>DPLowestSupported</key>
<string>15.0</string>
<key>DPSupportedRanges</key>
<array>
<dict>
<key>Start</key>
<string>15.0</string>
<key>End</key>
<string>15.4.1</string>
</dict>
</array>
<key>DPSupportInclude</key>
<array>
<dict>
Expand Down
13 changes: 9 additions & 4 deletions Application/Dopamine/Exploits/dmaFail/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@
<dict>
<key>DPFlavorPriority</key>
<integer>1000</integer>
<key>DPHighestSupported</key>
<string>16.5.1</string>
<key>DPLowestSupported</key>
<string>15.0</string>
<key>DPSupportedRanges</key>
<array>
<dict>
<key>Start</key>
<string>15.0</string>
<key>End</key>
<string>16.5.1</string>
</dict>
</array>
<key>DPSupportExclude</key>
<array>
<dict>
Expand Down
51 changes: 39 additions & 12 deletions Application/Dopamine/Exploits/kfd/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@
<dict>
<key>DPFlavorPriority</key>
<integer>800</integer>
<key>DPHighestSupported</key>
<string>16.6.1</string>
<key>DPLowestSupported</key>
<string>15.0</string>
<key>DPSupportedRanges</key>
<array>
<dict>
<key>Start</key>
<string>15.0</string>
<key>End</key>
<string>16.6.1</string>
</dict>
</array>
<key>DPSupportExclude</key>
<array/>
<key>DPSupportInclude</key>
Expand All @@ -21,10 +26,21 @@
<dict>
<key>DPFlavorPriority</key>
<integer>1000</integer>
<key>DPHighestSupported</key>
<string>16.3.1</string>
<key>DPLowestSupported</key>
<string>15.0</string>
<key>DPSupportedRanges</key>
<array>
<dict>
<key>Start</key>
<string>15.0</string>
<key>End</key>
<string>15.7.3</string>
</dict>
<dict>
<key>Start</key>
<string>16.0</string>
<key>End</key>
<string>16.3.1</string>
</dict>
</array>
<key>DPSupportExclude</key>
<array/>
<key>DPSupportInclude</key>
Expand All @@ -34,10 +50,21 @@
<dict>
<key>DPFlavorPriority</key>
<integer>600</integer>
<key>DPHighestSupported</key>
<string>16.5</string>
<key>DPLowestSupported</key>
<string>15.0</string>
<key>DPSupportedRanges</key>
<array>
<dict>
<key>Start</key>
<string>15.0</string>
<key>End</key>
<string>15.7.6</string>
</dict>
<dict>
<key>Start</key>
<string>16.0</string>
<key>End</key>
<string>16.5</string>
</dict>
</array>
<key>DPSupportExclude</key>
<array/>
<key>DPSupportInclude</key>
Expand Down
18 changes: 11 additions & 7 deletions Application/Dopamine/Jailbreak/DOExploit.m
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,17 @@ - (BOOL)isSupported
NSString *thisIOSVersion = [[UIDevice currentDevice] systemVersion];
BOOL isArm64e = [[DOEnvironmentManager sharedManager] isArm64e];

NSString *highestSupported = _flavorInfo[@"DPHighestSupported"];
NSString *lowestSupported = _flavorInfo[@"DPLowestSupported"];

NSComparisonResult highestResult = [thisIOSVersion compare:highestSupported options:NSNumericSearch];
NSComparisonResult lowestResult = [thisIOSVersion compare:lowestSupported options:NSNumericSearch];

_supported = ((highestResult == NSOrderedAscending || highestResult == NSOrderedSame) && (lowestResult == NSOrderedDescending || lowestResult == NSOrderedSame));
NSArray *supportedRanges = _flavorInfo[@"DPSupportedRanges"];
for (NSDictionary *supportedRange in supportedRanges) {
NSString *rangeStart = supportedRange[@"Start"];
NSString *rangeEnd = supportedRange[@"End"];

NSComparisonResult startResult = [thisIOSVersion compare:rangeStart options:NSNumericSearch];
NSComparisonResult endResult = [thisIOSVersion compare:rangeEnd options:NSNumericSearch];

_supported = ((endResult == NSOrderedAscending || endResult == NSOrderedSame) && (startResult == NSOrderedDescending || startResult == NSOrderedSame));
if (_supported) break;
}

NSArray *exclusionInclusionSets = _supported ? _flavorInfo[@"DPSupportExclude"] : _flavorInfo[@"DPSupportInclude"];
if (exclusionInclusionSets) {
Expand Down

0 comments on commit 2379e4b

Please sign in to comment.