Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save etherx-dev/27b02609f47bdbd8e5d0c71fcdd1374c to your computer and use it in GitHub Desktop.
Save etherx-dev/27b02609f47bdbd8e5d0c71fcdd1374c to your computer and use it in GitHub Desktop.
decode plisthex
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))
@etherx-dev
Copy link
Author

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:])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment