From d859cd6911ce2e59e83c9656a04fda480f1f98e3 Mon Sep 17 00:00:00 2001 From: leminlimez <59540996+leminlimez@users.noreply.github.com> Date: Mon, 17 Mar 2025 17:55:12 -0400 Subject: [PATCH] fix randomizing ids errors with plist updating --- README.md | 1 + controllers/plist_handler.py | 10 +++++----- tweaks/posterboard_tweak.py | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b8f55d2..771e52f 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,7 @@ If you would like to read more about the inner workings of the exploit and iOS r ## Credits - [JJTech](https://github.com/JJTech0130) for Sparserestore/[TrollRestore](https://github.com/JJTech0130/TrollRestore) - [PosterRestore](https://discord.gg/gWtzTVhMvh) for their help with PosterBoard + - Special thanks to dootskyre, [Middo](https://twitter.com/MWRevamped), [dulark](https://github.com/dularkian), and pingubow for their work on this. It would not have been possible without them! - [disfordottie](https://x.com/disfordottie) for some global flag features - [Mikasa-san](https://github.com/Mikasa-san) for [Quiet Daemon](https://github.com/Mikasa-san/QuietDaemon) - [sneakyf1shy](https://github.com/f1shy-dev) for [AI Eligibility](https://gist.github.com/f1shy-dev/23b4a78dc283edd30ae2b2e6429129b5) (iOS 18.1 beta 4 and below) diff --git a/controllers/plist_handler.py b/controllers/plist_handler.py index 41e425f..a94f887 100644 --- a/controllers/plist_handler.py +++ b/controllers/plist_handler.py @@ -2,11 +2,11 @@ import plistlib def recursive_set(plist: dict, key: str, value: any): new_plist: dict = plist - for curr_key in plist.keys: - if curr_key == key: - new_plist[curr_key] = value - elif isinstance(plist[curr_key], dict): - new_plist[curr_key] = recursive_set(plist[key], key, value) + for k, v in plist.items(): + if k == key: + new_plist[k] = value + elif isinstance(v, dict): + new_plist[k] = recursive_set(v, key, value) return new_plist def set_plist_value(file: str, key: str, value: any): diff --git a/tweaks/posterboard_tweak.py b/tweaks/posterboard_tweak.py index 349d351..649b234 100644 --- a/tweaks/posterboard_tweak.py +++ b/tweaks/posterboard_tweak.py @@ -16,7 +16,7 @@ class PosterboardTweak(Tweak): def update_plist_id(self, file_path: str, file_name: str, randomizedID: int): if file_name == "com.apple.posterkit.provider.descriptor.identifier": - return randomizedID.to_bytes() + return str(randomizedID).encode() elif file_name == "com.apple.posterkit.provider.contents.userInfo": return set_plist_value(file=os.path.join(file_path, file_name), key="wallpaperRepresentingIdentifier", value=randomizedID) elif file_name == "Wallpaper.plist":