yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] TomCatSG:
Help - Error

Hi,

Thanks for this tool. I'm trying to get it to work but got the attached error. Help please!

Thanks in advance.

This are the steps I did to install xtract and phthon:

1) Installed ActivePython 3.3.2.0 Windows (x86) to C:\ drive (C:\python33)

2) Extracted contents of Whatsapp Xtract to C:\Test.

3) After realising Xtract could not detect 'python' command, i moved the contents of C:\python33 into C:\Test

4) Copied msgstore and wa also to the C:\Test folder.

5) Then dragged msgstore to whatsapp_xtract_drag'n'drop_database(s)_here.

6) Encountered the below error.

===== start of error message ======

trying to repair android database...

trying to decrypt android database ..

Traceback (most recent call last):

File "C:\Test\whatsapp_xtract.py", line 961, in main

c1.execute("SELECT * FROM chat_list")

sqlite3.DatabaseError: file is encrypted or is not a database

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "C:\Test\whatsapp_xtract.py", line 979, in main

c1.execute("SELECT * FROM chat_list")

sqlite3.OperationalError: no such table: chat_list

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "C:\Test\whatsapp_xtract.py", line 2062, in <omdule>

main(sys.argv[1:])

File "C"Test\whatsapp_xtract.py", line 988 in main

from Crypto.Cipher import AES

ImportError: No module named 'Crypto'

Press any key to continue...

========= end of message =====

David
[Android Apps and Games] -V-O-Y-A-G-E-R-:
[MENTION=5705041]TomCatSG[/MENTION] You obviously have a problem with a crypto module.

Did you follow the instruction to the letter?

(presuming you're on Windows)
[Android Apps and Games] usd95:
huge file...

hey i have a very large backup so it doesnot open fully...can you do something.. like an html for every chat??
[Android Apps and Games] AntiDroid:
+1 :( I've tried it several times with your instructions and other ones.
[Android Apps and Games] -V-O-Y-A-G-E-R-:
Try installing pyCrypto from another source on the internet or following other directions...

http://goo.gl/3BzFz0

On Mac I used instruction from dearauthor.com's article How to Install Python and Pycrypto on Snow Leopard and PC.
[Android Apps and Games] joepixxy:
Check this out

if you are finding this tutorial difficult, go to youtube and type in this HOW TO READ ANYONE'S WHATSAPP MESSAGES (NEW METHOD 2014) and watch the simple video tutorial. The name of the channel is "pixxycreativities". Thanks
[Android Apps and Games] MementoMoriM:
Thanks by the tool, testing :D

Enviado desde la muerte a través de un Nexus4
[Android Apps and Games] TomCatSG:
Hi,

I've installed python in the directory C:\Python33. And yes i am on windows.

I've modified my "install pycrypto" file to remove the checks and run the commands immediately. See below for the contents of the modified file.

I run the "install pyCrypto" batch file, but encountered some errors.

Any idea what's missing?

============ Error Message ========================================================================================

C:\Python33>rem If you want to decrypt android whatsapp msgtore.db.crypt files,

then you need to run this (after installing ActivePython)

C:\Python33>"C:\Python33\Scripts\pypm" install pycrypto

warning: no such package found for requirement "pycrypto"; try PyPM Index:

C:\Python33>"C:\Python33\Scripts\pypm" show pycrypto

error: no such package found for requirement "pycrypto"; try PyPM Index:

C:\Python33>set pythonpath=

C:\Python33>setx pythonpath "C:\Python33"

SUCCESS: Specified value was saved.

C:\Python33>goto Quit

C:\Python33>echo _

_

C:\Python33>pause

Press any key to continue . . .

===============================================================================================================

<<<<<<<<<<<<<<<<<<<< Batch file content >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

rem If you want to decrypt android whatsapp msgtore.db.crypt files, then you need to run this (after installing ActivePython)

:Python32
[MENTION=279333]ECHO[/MENTION] ON

"C:\Python33\Scripts\pypm" install pycrypto

"C:\Python33\Scripts\pypm" show pycrypto
[MENTION=279333]ECHO[/MENTION] ON

set pythonpath=
[MENTION=279333]ECHO[/MENTION] ON

setx pythonpath "C:\Python33"
[MENTION=279333]ECHO[/MENTION] ON

goto Quit

:NoPython

echo _

echo Could not find the Python directory. Please make sure that ActivePython is installed in either %AppPath%\Python27 or %AppPath%\Python33

:Quit

echo _

pause

<<<<<<<<<<<<<<<<<<<< Batch file content >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
[Android Apps and Games] Ilya Ignatov:
Great tool!

Used for my iPhone

Works fine with local backups made by itunes and stored on my PC.

But...

When i tried to use ChatStorage.sqlite downloaded with iCloud backup (used Elcomsoft Phone Password Breaker ver. 1.92 build 1445, which allows to download icloud stored backups to PC) the program sets itself in android mode (dunno why) tries some decyptions and nothing works out.

The sqlite files from local and icloud backups are the same size and date but the one from icloud wont work with the program.

Any ideas on this? Might icloud encrypt the backup or just the whatsapp files somehow? Call history, SMS, notes etc. are read by other software used to view the backup, but whatsapp messages are still not read as well.
[Android Apps and Games] MoRoses:
wa.db error?

I'm trying to run this command:

python whatsapp_xtract.py msgstore.db -w wa.db

and i get the following error:

Python Version 2.x

Android mode!

Error: file is encrypted or is not a database

how do i fix it? if i run it without the wa.db it works but with no contact information.

Thanks in advance MoRoses.
[Android Apps and Games] ravvio:
Unable to Extract the .crypt files

I saw in the post that u would either need the data files or the .crypt files as the new version now supports decrypting of .crypt files...

I am getting the attached error when i drag and drop the .crypt files on whatsapp_xtract_drag'n'drop_database(s)_here.bat file

I already have the latest version 2.2 installed along with Python. Can you please assist ? I do not have the backup of data files but just the .crypt files from whatsapp database folder

Awaiting your response
[Android Apps and Games] tim18:
Do you already have an answer on this problem?

I have got the same issue.

How do you read the sms files out? With what kind of program?
[Android Apps and Games] kvunadkat:
Hi.

Is anyone able to help??
[Android Apps and Games] tim18:
Is it possible to extract the whatsapp messages from icloud?

It works fine when I extract it with iFunbox :)
[Android Apps and Games] bighog:
not a a valid database

I have the problem of not a valid database.

I have extracted the database, and install the py components, but when I run it says trying to repair android, then ios, then not valid

is it possible that the encryption has changed within whatsapp?

help would be appreciated.

thanks big
[Android Apps and Games] Dhruv Jadav:
Crypt error..

not working... :( :(

it says ImportError: No module named Crypto.Cipher

---------- Post added at 07:55 AM ---------- Previous post was at 07:37 AM ----------

same problem here brother....anyone can help???
[Android Apps and Games] der-nickel:
Hey there,

i was able to decrypt my android-db, but when i tried to open the plain.db i got this:

C:\Whatsapp_Xtract_V2.2_2012-11-17>python whatsapp_xtract.py msgstore.db.crypt
Python Version 2.x
Android mode!

trying to repair android database...
trying to decrypt android database...
decrypted database written to msgstore.plain.db
Error sqlite3.Error while reading chat #2846: database disk image is malformed

What's wrong with my plain.db?

Edit:

DB-Backup was malformed and error is correct. Tried an older backup and that worked fine!

Regards,

nickel
[Android Apps and Games] snake500:
ok so i guess this program still not works with the newer whatsapp backups, thats a shame

what bothers me is that i cant even open the pictures in the media folder. I mean, i see the files, they are jpg files and they all have a size usal for whatsapp images (100-500kb), but now matter what program i use, the image is just black. Any help on that?
[Android Apps and Games] -V-O-Y-A-G-E-R-:
It works just fine for me.
[Android Apps and Games] newbiedeveloper:
Still Work?
[Android Apps and Games] carlfinto:
This is really a nice app. I am really appreciated. But I want to know what is the technique you using for saving the deleted data...

I am developing one app which need this concept. Please help me.
[Android Apps and Games] -V-O-Y-A-G-E-R-:
[MENTION=5586350]newbiedeveloper[/MENTION] Yes, stil works. Used it last night.
[Android Apps and Games] snake500:
guys, it only works on older backups. I have Backups from February and January 2013. These work 100%. My Backups from January 2014 wont work. Same device, same computer, same everything.
[Android Apps and Games] -V-O-Y-A-G-E-R-:
guy, my backup was created in mid-February and it worked like a charm.
[Android Apps and Games] romitkin:
hi,

I am getting this error:

I tried updating the script from here

and it didn't help.

Could you please help me?
[Android Apps and Games] snake500:
well, so there is no explanation why some backups work and some not. Some i can open with an sql viewer and some say the file is encrypted. And no, the backups itself are never encrypted. Also, from the backups that dont work i still have like a 600mb media folder but all the images are just black. Whats wrong with these backups?
[Android Apps and Games] wibok:
Hi, this is my first message here, sorry for my english. I've been trying to open the file "chatstorage" from the iphone but it's been impossible. I' followed all the steps but it appears the error: "Could not open database file. Guess it's not a valid Android or Iphone database file." what can i do? i think that i've done everything ok. I installed the 32 bits activepython and pycripto version, what can i do? thanks a lot!
[Android Apps and Games] -V-O-Y-A-G-E-R-:
Can you see those media folders normally when browsing with some gallery app on the phone?

If not then there might indeed be encrypted.

Perhaps you encrypted them once and then opted for non-encrypted database but it remained encrypted.
[Android Apps and Games] snake500:
yeah i can see them on my phone

did a few more test with friends, looks like it doesnt work with iOS 7....., everything below works perfect
[Android Apps and Games] -V-O-Y-A-G-E-R-:
yes, might have something to do with that thing.
[Android Apps and Games] Amon-Don:
Hi,

this is/was an excellent tool. Great stuff and very useful. Sadly it just doesnt work anymore on backups from newer versions of ios7 or updated whatsapp. Any chance someone will fix it or update it?
[Android Apps and Games] demoniox12:
Hello, it's true, it seems that the updated key encryption in version 2.11.176 version of the android version, as could get the new key?

The new db crypted is "msgstore.db.crypt5" no more "msgstore.db.crypt"

Regards!
[Android Apps and Games] Amon-Don:
So i assume the encryption on the newer versions of Whatsapp on both ios7 and andriod have changed. Maybe there is a simple solution for this... or someone has a workaround or a patch?
[Android Apps and Games] -V-O-Y-A-G-E-R-:
On the latest Android, with the latest WA I can still access it normally, so I guess it's only on iOS part.
[Android Apps and Games] demoniox12:
In http://www.whatsapp.com/android/current/WhatsApp.apk (Last version) use other encryption..

Regards!
[Android Apps and Games] -V-O-Y-A-G-E-R-:
Mine is 2.11.152. Can you check which version that one is?
[Android Apps and Games] demoniox12:
Yes, is 2.11.176

Regards!
[Android Apps and Games] andy_muslim:
Help please.

Good afternoon. I have not obtained show the history

. As I understood the problem in pycrypto . I really need one photograph. I want to make a gift to the girl. and the pictures I deleted :(. Who will help me get a picture of the history of communications if I'll send through the mail file msgstore-2014-03-02.1.db.crypt ? Help please.
[Android Apps and Games] Raiyus13:
Okay so basically you have the pycrypto lib files missing.

I assume that you have already installed python and extracted the whatsapp extractor in the python installation folder.

Now, just unpack the .7z file attached, in the same folder.

hope that helped. :)
[Android Apps and Games] antojoseph007:
Hi ,

Whatsapp have updated their encryption and it is not possible to decrypt messages using the current script .

I have ran it against the new msgstore , ie : msgstore.db.crypt5 and it wont work .

Does anyone have any ideas to get it working ?
[Android Apps and Games] demoniox12:
Hi, I would have to get new key of the encryption .. Regards!
[Android Apps and Games] acedik:
Works well, using android version 2.11.152.

Thanks!
[Android Apps and Games] narclax:
Anyone has been able to decrypt the new crypt5 versions?
[Android Apps and Games] tezzoo:
Deleted Messages in ChatStorage.sqlite

Hi Guys

I'm not sure if someone has already found a solution.

A few of you have found deleted messages from whatsapp when they opened the ChatStorage.sqlite with a programm like: Word, Wordpad

but Xtrac or Sqlite Manager doesnt show them at all.

More or less with Word you can read them but in a very messy way and with loads of letters which are not shown correctly.

- This proofs the messages are still available, so what makes them invisible for Sqlite Manager/Xtract?

- What needs to be changed to make them visible again?

I'm sure there must be a way to show these messages correctly. But How??

I would like to push this Topic as I am not the only one who would like make these messages visible.

I Look forward to hear from you and if you need further information do not hesitate to contact me.

Greetz
[Android Apps and Games] Amon-Don:
Is there anything we can do to help?
[Android Apps and Games] wibok:
so is it there a new encryption key on ios7 chatstorage?? i can`t open the file :confused:
[Android Apps and Games] equ24:
crypt5

I have to do to enter this calve and see msgstore.db.crypt5 files?

thanks

---------- Post added at 01:49 PM ---------- Previous post was at 01:45 PM ----------

I have to do to enter this key and see msgstore.db.crypt5 files?

thanks
[Android Apps and Games] ark0n3:
anyone's interested in decrypting new whatsapp encryption? I'm taking a look this weekend with several decompiler.
[Android Apps and Games] demoniox12:
Maybe this helps for you: http://www.multiupload.nl/JV8SZBQHQU

Is a tutorial of the creator of Whatsapp Extract

Regards!
[Android Apps and Games] ark0n3:
thanks a lot, I already found this doc some time ago but forgot about it. it could come extremely handy!
[Android Apps and Games] insane_artist:
Can't make it work

Hi Guys, I tried a lot with it and couldn't make it work anyhow. I have msgstore.db.crypt files. If i upload them in dropbox, could anyone please extract it for me who is doing it and share it with me again? I would be really grateful for this! Urgently needed to extract something!
[Android Apps and Games] ark0n3:
what decompiler did you use?
[Android Apps and Games] wibok:
please tell us something when you have news!
[Android Apps and Games] sam@xda29:
Yes I will do it for you ..

No problem.

Just shoot a PM to me..

I will happy to help you.
[Android Apps and Games] equ24:
crypt5

yet no one has managed to decipher the msgstore.db.crypt5 file? I'm trying to but can not find the key. Hope THANK response
[Android Apps and Games] amst3l:
Does anyone know how to restore a CRYPT5 file in to whatsapp? Almost bricked my phone today and had to do a factory reset. Only to find out that it doesn't restore crypt5 files
[Android Apps and Games] GreenXSI:
Quick question - Is it possible to edit existing log files, modify messages and reload them back into Whatsapp?
[Android Apps and Games] sam@xda29:
What do you mean by existing log files??

And if I got it right then yes It's possible...

But let me know exactly you do you really wanna.mean.
[Android Apps and Games] -V-O-Y-A-G-E-R-:
Probably to change the content of the database and then to feed it back to WA.
[Android Apps and Games] tm14984:
If i Install and 32bit version i always get the python27.dll is lost..... with 64bit i cant start it..... i reinstalled each times the different 32bit versions.... what now`!?
[Android Apps and Games] GreenXSI:
I meant editing a chat log and then feed it back to whatsapp so it loads the edited log file in chat history.
[Android Apps and Games] ark0n3:
drop me a pm if you're interested in helping out. i'm trying to figure out if and how it's possible to find the new encryption key.
[Android Apps and Games] suhas_gp:
I am also ready to help out. Have dropped you a PM
[Android Apps and Games] Bulleis:
Hey guys

What about 'msgstore.db.crypt4'?
[Android Apps and Games] Kak4shiii:
Hi guys,

I have the latest WhatsApp version 2.11.186 and it does not work for me. The red circled word is the file I have exported from my smartphone (Database).

Does anyone have a solution? :)
[Android Apps and Games] ILoveAndroid77:
According to its developer, the app

https://play.google.com/store/apps/details?id=de.tiflo.whatsapp.statistics.donate

can decrypt the new crypt5 files.

Maybe it will be easier to dig through this app to see how to decrypt instead of analyzing whatsapp...
[Android Apps and Games] demoniox12:
Apk: https://www.dropbox.com/s/op9kb8sl61cji8y/de.tiflo.whatsapp.statistics.donate_15.apk
[Android Apps and Games] Kak4shiii:
wishhr Habit

Arg I did choose the wrong file from the WhatsApp-Database. Now it works. But only with 'older' Bakups.

Is someone from XDA trying to find the key for the new .db.crypt5 ??
[Android Apps and Games] TripCode:
This app uses System.loadLibrary("aes"); to load libaes.so from the /lib folder. I think it would be easier to decompile dalvik than elf. :eek:

From what I can tell so far picking through WhatsApp. The new version encrypts crypt5 several times over. One of the keys is generated against getAccounts(). Specifically com.google which is basically the gmail address linked to the device. I think I might have a go at building a simple standalone decrypter, though you will NEED to know the gmail account linked to the handset in order for the decryption to work.

I will post an update back here if I'm successful with developing a working proof of concept.
[Android Apps and Games] ILoveAndroid77:
You are right. The other app decrypts using a native library libaes. And you are right again, one key or part one key is the google account email.

The other app uses the google account name (the email) as an input parameter for the native decrypt method.
[Android Apps and Games] viperbjk:
Having a short session of IDA and java decompiler it seems to use the account name, does make md5 hash, then xors that using a hardcoded magic key and uses that as key for aes_cbc_192 together with another hardcoded magic key for iv. Might come back with full details if needed :)
[Android Apps and Games] TripCode:
They're definitely using account_name to generate a native key.

The decryption keys are as follows:

Key 1: 346a23652a46392b4d73257c67317e352e3372482177652c < Original Key Still Used

Key 2: 210a32310653593a195f301c766552204e22266434177478

Key 3: 2693d154f27a9571121418752207ef0e53b2b2fa5444538b

IV PS: 1e39f369e90db33aa73b442bbbb6b0b9

Key 4: 8d4b155cc9ff81e5cbf6fa7819366a3ec621a656416cd793

Key 5: NATIVE ANDROID KEY GENERATION

I haven't had time to put this into python or anything yet, but I have built an online decrypter.

The decrypter is located at (url): whatsapp.livetrack.mobi

As soon as I get some more time to smooth out the code I shall port it to python, unless someone beats me to it. :D

Have fun guys and gals.

P.S. Three guesses why they stuck the number 5 at the end of .crypt ;)
[Android Apps and Games] Blue ripazah:
unable to read iphone msgs

hi all i m getting this message attached in the image below ....plz help me find a solution to this

thanx in advance
[Android Apps and Games] viperbjk:
In chatstorage.db, the thumbnails are no longer stored as a blob field. Attached is a fixed version of mine for iphones :D
[Android Apps and Games] aramosf:
Hello all and thank you for all.

public script github /aramosf/pwncrypt5/blob/master/pwncrypt5.py
[Android Apps and Games] ILoveAndroid77:
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.math.BigInteger;
import java.security.MessageDigest;
import java.util.Arrays;

import javax.crypto.Cipher;
import javax.crypto.CipherInputStream;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;

public class WhatsAppDecrypt5 {

private static final byte[] INITIALIZATION_VECTOR = hexStringToByteArray("1e39f369e90db33aa73b442bbbb6b0b9");
private static final byte[] ENCRYPTION_KEY = hexStringToByteArray("8d4b155cc9ff81e5cbf6fa7819366a3ec621a656416cd793");

public static void main(String[] args) throws Exception {
if (args.length != 3) {
System.out.println("usage <inputfile> <outputfile> <email>");
System.exit(0);
}
decrypt(new File(args[0]), new File(args[1]), args[2]);
}

private static void decrypt(File inputFile, File outputFile, String email) throws Exception {
String emailMD5 = md5(email);
byte[] emailMD5Bytes = hexStringToByteArray(emailMD5 + emailMD5);

byte[] decryptionKey = Arrays.copyOf(ENCRYPTION_KEY, 24);
for (int i = 0; i < 24; i++) {
decryptionKey[i] ^= emailMD5Bytes[i & 0xF];
}

Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding", "SunJCE");
cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(decryptionKey, "AES"), new IvParameterSpec(
INITIALIZATION_VECTOR));
CipherInputStream cIn = new CipherInputStream(new FileInputStream(inputFile), cipher);
FileOutputStream fOut = new FileOutputStream(outputFile);

byte[] buffer = new byte[8192];
int n;
while ((n = cIn.read(buffer)) != -1) {
fOut.write(buffer, 0, n);
}

cIn.close();
fOut.close();
}

private static byte[] hexStringToByteArray(String s) {
int len = s.length();
byte[] data = new byte[len / 2];
for (int i = 0; i < len; i += 2) {
data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4) + Character.digit(s.charAt(i + 1), 16));
}
return data;
}

private static String md5(String md5) throws Exception {
MessageDigest m = MessageDigest.getInstance("MD5");
m.reset();
m.update(md5.getBytes());
byte[] digest = m.digest();
BigInteger bigInt = new BigInteger(1, digest);
return bigInt.toString(16);
}
}
[Android Apps and Games] antojoseph007:
It's very sad that the security of what'sapp comes down to your account name.. !!

Good work dude..
[Android Apps and Games] ajinkyakolhe112:
Hey TripCode,

Awesome... Thanks a lot for the info. But can you please tell me how did you find these out? I was trying to do the same but I couldn't. If you just give me some pointers, it would be great.

Thanks,

Aj
[Android Apps and Games] saurabhvasa:
First of all thanks a lot for putting such a great efforts...

2... I did manage to go to your site and dycript..recvd zip file and in that there is a file msgstore.db ..

i copied this file in folder and i run whatsapp_xtract_android.bat .. but i got error no such table: wa_contacts

Can you please tell me wht i m doing wrong ...

Eagerly waiting for your reply.
[Android Apps and Games] Amon-Don:
Nice one!

This doesnt handle iPhone files right?
[Android Apps and Games] sur5al:
You have to rename it into msgstore.db.CRYPT and start the whatsapp_xtract_android.crypted...

Thats All

P.S. Shall I beat you to putting this into python or something else ? It´s awesome...thank you ;):good::good::good:
[Android Apps and Games] joko15:
I just started the new .py file with a batch (python newfile.py msgstore.db.crypt5 email) but always my cmd is stuck.

Whats wrong?
[Android Apps and Games] wibok:
How can I decrypt ChatStorage file?? :confused:
[Android Apps and Games] saurabhvasa:
yes it does ... it does work now...

thanks a lot... beer treat .... Cheers!!!!