Created
May 28, 2023 23:05
-
-
Save etherx-dev/27b02609f47bdbd8e5d0c71fcdd1374c to your computer and use it in GitHub Desktop.
decode plisthex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import NSKeyedUnArchiver, json | |
def decodePlist(data): | |
if data[:2]=='0x': data=data[2:] | |
data=bytes.fromhex(data) | |
my_dict=NSKeyedUnArchiver.unserializeNSKeyedArchiver(data) | |
return(json.dumps(my_dict, indent=4, sort_keys=True, default=str)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
import os
dir=('/Users/work/Desktop/bplists/')
for file in os.listdir(dir):
filepath=(os.path.join(dir,file))
filebin=open(filepath,'rb').read()
filehex=filebin.hex()
pliststart=(filehex.find('62706c6'))
print(filehex[pliststart:])