mirror of
https://github.com/leminlimez/Nugget.git
synced 2025-04-08 04:23:05 +08:00
handle patched versions (18.2 beta 3+)
This commit is contained in:
@@ -13,6 +13,14 @@ class Device:
|
||||
self.locale = locale
|
||||
self.ld = ld
|
||||
|
||||
def is_exploit_fully_patched(self) -> bool:
|
||||
parsed_ver: Version = Version(self.version)
|
||||
# mobile gestalt methods are completely patched on iOS 18.2 dev beta 3+
|
||||
if (parsed_ver < Version("18.2")
|
||||
or self.build == "22C5109p" or self.build == "22C5125e"):
|
||||
return False
|
||||
return True
|
||||
|
||||
def has_exploit(self) -> bool:
|
||||
parsed_ver: Version = Version(self.version)
|
||||
# make sure versions past 17.7.1 but before 18.0 aren't supported
|
||||
|
||||
@@ -181,6 +181,12 @@ class DeviceManager:
|
||||
return False
|
||||
else:
|
||||
return self.data_singleton.current_device.supported()
|
||||
|
||||
def get_current_device_patched(self) -> bool:
|
||||
if self.data_singleton.current_device == None:
|
||||
return True
|
||||
else:
|
||||
return self.data_singleton.current_device.is_exploit_fully_patched()
|
||||
|
||||
|
||||
def reset_device_pairing(self):
|
||||
|
||||
@@ -387,7 +387,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
||||
|
||||
def show_version_text(self, version: str, build: str):
|
||||
support_str: str = "<span style=\"color: #32d74b;\">Supported!</span></a>"
|
||||
if Version(version) < Version("17.0"):
|
||||
if Version(version) < Version("17.0") or self.device_manager.get_current_device_patched():
|
||||
support_str = "<span style=\"color: #ff0000;\">Not Supported.</span></a>"
|
||||
elif not self.device_manager.get_current_device_supported():
|
||||
# sparserestore partially patched
|
||||
|
||||
Reference in New Issue
Block a user