Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crypt12 - Error during unzipping (inflate) #37

Closed
madknownz opened this issue May 2, 2017 · 40 comments
Closed

crypt12 - Error during unzipping (inflate) #37

madknownz opened this issue May 2, 2017 · 40 comments

Comments

@madknownz
Copy link

madknownz commented May 2, 2017

Please help, tried several time but the same result error with unzipping (inflate). Need to view and old important data from my backup.
v1.9

@izzylaif
Copy link

izzylaif commented May 9, 2017

The error is misleading.
This is because your key is incorrect. Everytime Whatsapp verifies your phone number, a new key is generated.
Just open a couple crypt12 files that decodes fine in a text/hex editor and visually compare the beginning of the file to a couple of crypt12 that don't decode with the same key. You see that for the OK files the the beginnings of the files are identical, and different from those that don't open, which are also identical among themselves.
The utility applies the key, but since it's incorrect, the resulting garbage is not an archive and cannot be inflated, thus the error.
What you may try to do is:

  • copy to pc and rename one of those files to msgstore.db.crypt12
  • uninstall whatsapp from the phone
  • install it again BUT DO NOT RUN IT YET
  • copy back the renamed file to the whatsapp folder
  • run the app, confirm the phone number, and agree to restore the database.
    Whatsapp might send one of the old keys to your phone to decode the backup

Please let me know if it works.

@andreas-mausch
Copy link
Owner

I try to provide you some terminal commands by tomorrow.
Thank you izzylaif for the detailed description. 👍

@andreas-mausch
Copy link
Owner

Can you please try this script and let me know if it works for all of your files (I hope you are familar with node)? If it does there must be a bug in the C++ code.

https://github.com/andreas-mausch/whatsapp-viewer/blob/node/decrypt-crypt12.js

$ node ./decrypt-crypt12.js ./msgstore.db.crypt12 ./key ./msgstore.db
Key:  <Buffer XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX>
Initialization vector:  <Buffer XX XX XX XX XX XX XX XX XX XX XX XX>
crypted:  <Buffer XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX ... >
decrypted (gzipped):  <Buffer XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX ... >
decrypted:  <Buffer XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX ... >

written to msgstore.db

OpenSSL doesn't support AES GCM on command line for some reason:

$ openssl enc -aes-256-gcm
AEAD ciphers not supported by the enc utility

@any81
Copy link

any81 commented May 12, 2017 via email

@any81
Copy link

any81 commented May 12, 2017 via email

@any81
Copy link

any81 commented May 12, 2017 via email

@any81
Copy link

any81 commented May 12, 2017 via email

@any81
Copy link

any81 commented May 12, 2017 via email

@any81
Copy link

any81 commented May 12, 2017 via email

@andreas-mausch
Copy link
Owner

Hi,

@any81 Thanks for the invitation to Italy, I appreciate that. Were you aware your comments are visible in public? I've removed the phone number from your comment. We discuss on this page: #37
For private messages you can contact me at andreas.mausch@gmail.com

@utmuk Good job on coming so far if linux and node are new to you. Most people would've given up already. In your last screnshot the parameters are not correct, please check them precisely:

node ./decrypt-crypt12.js ./msgstore.db.crypt12 ./key ./msgstore.db

If you know python, this script might be easier to use for you: https://github.com/EliteAndroidApps/WhatsApp-Crypt12-Decrypter

Andreas

@any81
Copy link

any81 commented May 12, 2017 via email

@any81
Copy link

any81 commented May 12, 2017 via email

@any81
Copy link

any81 commented May 12, 2017 via email

@any81
Copy link

any81 commented May 12, 2017 via email

@any81
Copy link

any81 commented May 12, 2017 via email

@any81
Copy link

any81 commented May 12, 2017 via email

@any81
Copy link

any81 commented May 12, 2017 via email

@any81
Copy link

any81 commented May 12, 2017 via email

@any81
Copy link

any81 commented May 12, 2017 via email

@any81
Copy link

any81 commented May 12, 2017 via email

@andreas-mausch
Copy link
Owner

@utmuk Ok then it is a bug in WhatsApp Viewer. :( Could you provide me one failing database file plus the key, so I'd be able to debug it?
I will delete the files immediately after I finish the work.

@any81 Please, utmuk is absolutely right. You are hijacking and spamming this thread and make it hard for us to solve a bug in the app. He is putting in a lot of effort to narrow the bug down so please either create a new issue or use my contact details above to reach me. Don't reply to this email please.

@carlostang
Copy link

Hi Andreas, i have the same error decrypting: Error during unzipping (inflate) , is there a new version with the fix for that error? I can only decrypt a single file.

@zecaguilherme
Copy link

@andreas-mausch I have the exactly same problem. Most of the files are decrypted correctly but some aren't.

@andreas-mausch
Copy link
Owner

@zecaguilherme Could you provide me sample files? Would help a lot.

@zecaguilherme
Copy link

@andreas-mausch Sorry taking so long to reply.... Yeah, I can provide. Just tell me how to send you the files

@andreas-mausch
Copy link
Owner

@zecaguilherme andreas.mausch@gmail.com
if it is too big use https://uploadfiles.io/
thank you

@virginia91
Copy link

Hi, Andreas.
I have tried to decrypt a whatsapp database (crypt12) from my old mobile phone and I get the error "Error during unzipping (inflate)".

What happened is that I stopped using my old phone and the phone company cancelled the number. Then, one day, I decided to recover my conversations to save them on the computer. I switched on the telephone and a message appeared telling me that I had to verify my phone number for Whatsapp (the number did not belong to me anymore). I became nervous and I verified a new phone number.

I am afraid that verifying Whatsapp with another number might have damaged the databases or the key.

I would be very grateful if you could help me or tell me if there is any solution.

Thank you in advance for your time and for your generosity.

I have sent you an email with the files :)

Kind regards

@Ruud79
Copy link

Ruud79 commented Aug 9, 2017

Hi Andreas, i have the same error decrypting: Error during unzipping (inflate). Mostly it works but sometimes not, then the next backup or the next therafter will work again. I can supply you with sample files if you need more than @zecaguilherme already provided.

@andreas-mausch
Copy link
Owner

Thanks @Ruud79, I haven't found time yet to fix this. However, I've set up a development VM for WhatsApp Viewer so I should be able to fix it fast. I'll let you know if I need more files.

@andreas-mausch
Copy link
Owner

Will be solved in v1.10
Thank you very much for the provided files!

@sakujo
Copy link

sakujo commented Jan 11, 2018

@izzylaif
this:

copy to pc and rename one of those files to msgstore.db.crypt12
uninstall whatsapp from the phone
install it again BUT DO NOT RUN IT YET
copy back the renamed file to the whatsapp folder
run the app, confirm the phone number, and agree to restore the database.
Whatsapp might send one of the old keys to your phone to decode the backup

works. TY! (on samsung s4, andr ver 5.0.1, date: 11.01.18)

@Shabihbhai
Copy link

@andreas-mausch Please check your email. I sent your one request

@akkip910
Copy link

Hi
I am using Mi phone with android version 6.0.1 MMB29M.

I have installed all required apps java, whatsapp db extractor tool, whatsapp viewer on my win 10 and usb debugging on. while running extractor tool its not showing backup my data pop up in my phone. And when it completes its not installing whatsapp back to my phone after many attempts also and nothing comes in extracted folder.

Please suggest.

@akashg079
Copy link

hi i also have this problem i have database backup and key also of that number but still unable to read messages and media using WhatApp viewer can you help me please it's very urgent.... I have everything database and key also but showing error with unzipping (inflate) in 99% please help me here
reply me soon waiting for it ..

@mariakhan16198
Copy link

i have a problem error with unzipping(inflate). and i m using NSWhatsapp. please resolve it.

@Juanamary
Copy link

Juanamary commented May 6, 2020

@andreas-mausch @izzylaif Please if you could help me with the error problem unzipping (inflate) by 99% ... I have tried what @izzylaif said but I was not successful, nor do I know if that method was effective ... I do not know how to generate that old key for conversations from a few months ago, or if there is another method to decrypt them ... I have the root phone and the key too but I can only decode the current ones ... I hope to hear from you soon, thanks

@izzylaif
Copy link

izzylaif commented May 6, 2020

If you have access to the sim card with the phone number, you may try the following.
Do a fresh install of whatsapp but don't open it yet. Copy that old crypt you have to the databases directory (where whatsapp normally stores backup). You may need to crreate the whatsapp directory and databases directory, and make sure the crypt is the only file there.
Then launch the app, it will prompt for sms verification, after that it may (or may not) ask if you want to restore that database.
That's the only option to try so far.

@Juanamary
Copy link

Juanamary commented May 7, 2020

Thanks @izzylaif I will try that method to see if it works ... Although I already did it, but I don't remember if I applied it well. I also wanted to know if after 3 years that you have the conversation thread if there would be any effective method for it, but I see that your answer has been like the one you wrote earlier.
Did you or someone really succeed with this method? Also, every time you want to restore some database you would have to do the same operation right?

@izzylaif
Copy link

And how do I create the database directory before running the app

Sorry, creating folders is basic knowledge. You should really learn how to actually use the devices you spend your entire day with.
This may help though https://www.youtube.com/watch?v=m13ZuwFvZL4

@ManasSathyan
Copy link

And how do I create the database directory before running the app

Sorry, creating folders is basic knowledge. You should really learn how to actually use the devices you spend your entire day with.
This may help though https://www.youtube.com/watch?v=m13ZuwFvZL4

Oh, I was so stressed out my brain wasn't working properly. And I also got a bit confused with the term database directory. I managed to figure it out tho, and was able to restore what I was looking for. Thank you anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests