fix: plist not saving

This commit is contained in:
zx
2024-09-06 09:14:58 -04:00
parent dc21719157
commit 9726026c92

View File

@@ -15,6 +15,10 @@ class Plist:
def __getitem__(self, key: str) -> Any: def __getitem__(self, key: str) -> Any:
return self.data.get(key, None) return self.data.get(key, None)
def save(self) -> None:
with open(self.path, "w") as f:
plistlib.dump(self.data, f)
def remove(self, key: str) -> bool: def remove(self, key: str) -> bool:
try: try:
del self.data[key] del self.data[key]
@@ -24,7 +28,8 @@ class Plist:
def remove_uisd(self) -> None: def remove_uisd(self) -> None:
if self.remove("UISupportedDevices"): if self.remove("UISupportedDevices"):
print("[*] removed UISupportedDevices") self.save()
print("[*] removed UISupportedDevices")
else: else:
print("[?] no UISupportedDevices") print("[?] no UISupportedDevices")