randomize descriptor uuid & id (untested)

This commit is contained in:
leminlimez
2025-03-17 16:57:37 -04:00
parent 6c229392e0
commit 63dee6dd48
3 changed files with 53 additions and 7 deletions

View File

@@ -0,0 +1,16 @@
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)
return new_plist
def set_plist_value(file: str, key: str, value: any):
with open(file, 'rb') as in_fp:
plist = plistlib.load(in_fp)
new_plist = recursive_set(plist, key, value)
return plistlib.dumps(new_plist)