I'm trying to access leveldbs generated by Chrome storing indexeddbs. I get keys and values. But they are either in an unknown encoding - I've tried many ways to detect them - or they are scrambled in some way.
import plyvel
db = plyvel.DB(dirname, comparator=cmp, comparator_name="idb_cmp1")
for key, value in db:
print(key)
print(value)
I don't mind if the keys are in random order as described here. But it would be nice to get the keys and values in a readable fashion. I'm not dealing with binary data in the leveldb, either.
I'm using plyvel in python to iterate over the db. This answer might be related: LevelDB C iterator
you may fake it by passing exactly the same comparator name to a custom comparator in plyvel. that comparator may work differently from the one originally used to create the database. that would get you past the first hurdle i guess.
but since leveldb does not provide a read-only mode of operation, there may be a background thread kicking in to do some compaction while you read the database. and since the comparator is mishaving, this can lead to data loss and destruction of your database.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With