mirror of
https://github.com/leminlimez/Nugget.git
synced 2025-04-08 04:23:05 +08:00
fix randomizing ids errors with plist updating
This commit is contained in:
@@ -119,6 +119,7 @@ If you would like to read more about the inner workings of the exploit and iOS r
|
|||||||
## Credits
|
## Credits
|
||||||
- [JJTech](https://github.com/JJTech0130) for Sparserestore/[TrollRestore](https://github.com/JJTech0130/TrollRestore)
|
- [JJTech](https://github.com/JJTech0130) for Sparserestore/[TrollRestore](https://github.com/JJTech0130/TrollRestore)
|
||||||
- [PosterRestore](https://discord.gg/gWtzTVhMvh) for their help with PosterBoard
|
- [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
|
- [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)
|
- [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)
|
- [sneakyf1shy](https://github.com/f1shy-dev) for [AI Eligibility](https://gist.github.com/f1shy-dev/23b4a78dc283edd30ae2b2e6429129b5) (iOS 18.1 beta 4 and below)
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ import plistlib
|
|||||||
|
|
||||||
def recursive_set(plist: dict, key: str, value: any):
|
def recursive_set(plist: dict, key: str, value: any):
|
||||||
new_plist: dict = plist
|
new_plist: dict = plist
|
||||||
for curr_key in plist.keys:
|
for k, v in plist.items():
|
||||||
if curr_key == key:
|
if k == key:
|
||||||
new_plist[curr_key] = value
|
new_plist[k] = value
|
||||||
elif isinstance(plist[curr_key], dict):
|
elif isinstance(v, dict):
|
||||||
new_plist[curr_key] = recursive_set(plist[key], key, value)
|
new_plist[k] = recursive_set(v, key, value)
|
||||||
return new_plist
|
return new_plist
|
||||||
|
|
||||||
def set_plist_value(file: str, key: str, value: any):
|
def set_plist_value(file: str, key: str, value: any):
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class PosterboardTweak(Tweak):
|
|||||||
|
|
||||||
def update_plist_id(self, file_path: str, file_name: str, randomizedID: int):
|
def update_plist_id(self, file_path: str, file_name: str, randomizedID: int):
|
||||||
if file_name == "com.apple.posterkit.provider.descriptor.identifier":
|
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":
|
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)
|
return set_plist_value(file=os.path.join(file_path, file_name), key="wallpaperRepresentingIdentifier", value=randomizedID)
|
||||||
elif file_name == "Wallpaper.plist":
|
elif file_name == "Wallpaper.plist":
|
||||||
|
|||||||
Reference in New Issue
Block a user