Skip to content

Error trying to read bplist from iPhone backup database #10

@unformatt

Description

@unformatt

I've extracted bplist data from a sqlite row of data from iTunes backup. When I try to parse it like this: BPListReader.plistWithString(bplist_str)

I get this error:

python2.7/site-packages/bplist/bplist.py", line 147, in __unpackItem
    obj_type, obj_info = (obj_header & 0xF0), (obj_header & 0x0F)
TypeError: unsupported operand type(s) for &: 'str' and 'int'

Did a little inspecting in pdb:

(Pdb) !type(obj_header)
<type 'str'>
(Pdb) !len(obj_header)
1
(Pdb) !obj_header
'\xd4'
(Pdb) !obj_type, obj_info = (obj_header & 0xF0), (obj_header & 0x0F)
*** TypeError: unsupported operand type(s) for &: 'str' and 'int'

I rather not share the bplist data since I don't what personal data is in it but If I save the bplist data to a file and preview in finder, it's able to parse the data:

with open('/temp/blist-test.plist', 'w') as f:
            f.write(bplist_str)

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions