ElDavoo / wa-crypt-tools

Manage WhatsApp .crypt12, .crypt14 and .crypt15 files.
GNU General Public License v3.0
583 stars 78 forks source link

Keyfile is not a valid Java object #42

Closed ghost closed 1 year ago

ghost commented 1 year ago

Program returns the following error

[F] The keyfile is not a valid Java object: Invalid file magic: 0xefbb

I made a text file using gedit with the key inside and then renamed it to encrypted_backup.key. Is that not right?

Thank you

ElDavoo commented 1 year ago

Hi,

I made a text file using gedit with the key inside and then renamed it to encrypted_backup.key. Is that not right?

That's not right. You have two ways: 1) Use utils/hex_string_to_encrypted_backup_key.py to create an encrypted_backup.key file 2) Use the key directly in the command line, example here.

Let me know!

ElDavoo commented 1 year ago

If you're too lazy to do that and you're not using Windows, you can use a shell trick to read the file and use it as it was a parameter: python ./decrypt14_15.py $(cat encrypted_backup.key) ./msgstore.db.crypt15 ./msgstore.db or

python ./decrypt14_15.py `cat encrypted_backup.key` ./msgstore.db.crypt15 ./msgstore.db
ghost commented 1 year ago

Your second solution worked :) (I had to use --force though, do I report that somewhere?) and I am now able to access all my messages with DB Browser for SQLite. Thank you tons :)))

ElDavoo commented 1 year ago

Your second solution worked :) (I had to use --force though, do I report that somewhere?)

Yes. Can you send the full log?

ghost commented 1 year ago

How to do so?

ElDavoo commented 1 year ago

select all the program output and the command line and copy-paste here

ghost commented 1 year ago

It actually worked fine now without --force when doing a re-run, so it may have been one of the error-runs where I didn't have all of the packages and I misremembered. Sorry for the confusion!