From 9726026c922bc6f11148d45066982bff204d5fb4 Mon Sep 17 00:00:00 2001 From: zx <109937991+asdfzxcvbn@users.noreply.github.com> Date: Fri, 6 Sep 2024 09:14:58 -0400 Subject: [PATCH] fix: plist not saving --- cyan/tbhtypes/plist.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cyan/tbhtypes/plist.py b/cyan/tbhtypes/plist.py index 982b9ab..620861c 100644 --- a/cyan/tbhtypes/plist.py +++ b/cyan/tbhtypes/plist.py @@ -15,6 +15,10 @@ class Plist: def __getitem__(self, key: str) -> Any: 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: try: del self.data[key] @@ -24,7 +28,8 @@ class Plist: def remove_uisd(self) -> None: if self.remove("UISupportedDevices"): - print("[*] removed UISupportedDevices") + self.save() + print("[*] removed UISupportedDevices") else: print("[?] no UISupportedDevices")