feat: extend range of exploit check

this is a huge hack but for now and what this is used for elsewhere

Signed-off-by: nythepegasus <mobile@nythepegas.us>
This commit is contained in:
nythepegasus
2026-04-09 20:35:59 -04:00
committed by GitHub
parent ae380e48dd
commit 5efed9df08

View File

@@ -85,12 +85,12 @@ extension ProcessInfo {
} }
public var sparseRestorePatched: Bool { public var sparseRestorePatched: Bool {
if operatingSystemVersion < OperatingSystemVersion(majorVersion: 18, minorVersion: 1, patchVersion: 0) { false } // only true if we are 18.7.2<=26 || >=26.0.2
else if operatingSystemVersion > OperatingSystemVersion(majorVersion: 18, minorVersion: 1, patchVersion: 1) { true } if (OperatingSystemVersion(majorVersion: 18, minorVersion: 7, patchVersion: 2) <= operatingSystemVersion && operatingSystemVersion.majorVersion == 18) || operatingSystemVersion >= OperatingSystemVersion(majorVersion: 26, minorVersion: 0, patchVersion: 2) { true }
else if operatingSystemVersion >= OperatingSystemVersion(majorVersion: 18, minorVersion: 1, patchVersion: 0), // we are 26.0<26.0.2
let currentBuild = BuildVersion(operatingSystemBuild), else if operatingSystemVersion < OperatingSystemVersion(majorVersion: 26, minorVersion: 0, patchVersion: 2) { false }
let targetBuild = BuildVersion("22B5054e") { // we are <18.7.2
currentBuild >= targetBuild else if operatingSystemVersion < OperatingSystemVersion(majorVersion: 18, minorVersion: 7, patchVersion: 2) { false }
} else { false } else { true }
} }
} }