Giter Site home page Giter Site logo

andreas-mausch / whatsapp-viewer Goto Github PK

View Code? Open in Web Editor NEW
1.2K 139.0 381.0 4.73 MB

Small tool to display chats from the Android msgstore.db database (crypt12)

Home Page: https://andreas-mausch.de/whatsapp-viewer/

License: MIT License

C 91.55% C++ 8.35% Batchfile 0.01% CMake 0.05% Makefile 0.04%

whatsapp-viewer's Introduction

WhatsApp Viewer

Small tool to display chats from the Android msgstore.db database.

Status

๐Ÿ›‘โš  WhatsApp Viewer does not work with the latest WhatsApp database format. โš ๐Ÿ›‘

I only maintain this project every once in a while.

WhatsApp gets a lot of updates with a bunch of new features.
I do have interests beside this project and unfortunately not enough time to keep up with the updates.

This project is not dead though (even if it looks like it), and I still take a plaintext database backup once in a while (about every year) and try to update this software accordingly.

How to use

  1. You need root access to your phone. If you don't know what it is: Wikipedia
  2. Download your WhatsApp database and key files:
  • /data/data/com.whatsapp/files/key
  • /data/data/com.whatsapp/databases/msgstore.db
  • /data/data/com.whatsapp/databases/wa.db
  1. Open WhatsApp Viewer
  2. File -> Open -> Select file
  3. Select msgstore.db in the folder "extracted"
  4. Leave account name empty, is was used for older versions of WhatsApp (crypt5)
  5. Optional: If you want, you can import contact names from the wa.db file

Command line support

"WhatsApp Viewer.exe" -decrypt14 msgstore-2016-10-22.1.db.crypt14 whatsapp.cryptkey14 decrypted.db

You cannot see bigger images because only thumbnails are stored in the database.

Build

Visual Studio

Open WhatsApp Viewer.sln.

Command-line

See build-release.cmd.

Vagrant

You can also use vagrant to build (for example if you are on a Linux machine):

vagrant up
vagrant powershell -c 'cmd.exe /c "cd C:\vagrant && build-release.cmd"'

Android Emulator

I use the Android Emulator to test WhatsApp (and the creation of backups) on my developer machine.

I'm on Manjaro and use this (see here):

sudo mkdir /opt/android-sdk/platforms
sudo mkdir /opt/android-sdk/platform-tools
yay -S android-sdk-cmdline-tools-latest android-emulator
yes | sudo sdkmanager "system-images;android-30;google_apis;x86"
avdmanager create avd --name "WhatsApp-Viewer" --package "system-images;android-30;google_apis;x86" --device "Nexus 6P"
emulator -avd "WhatsApp-Viewer"

adb install ./WhatsApp.apk

adb pull -a /sdcard/WhatsApp/Databases/msgstore.db.crypt14
adb root
adb pull -a /data/data/com.whatsapp
adb unroot

I've also did this to enable the hardware keyboard.

Export schema

sqlite3 msgstore.db ".schema --nosys" > ./data/msgstore.db.schema.sql

Build test database

rm -f ./data/test-database.db && sqlite3 ./data/test-database.db -cmd ".read data/msgstore.db.schema.sql" ".read data/test-database.sql"

Credits

whatsapp-viewer's People

Contributors

andreas-mausch avatar zmeyc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

whatsapp-viewer's Issues

generated wa.db file does not feed contact names.

Hi there,
Running WhatApp current version (2.12.250) on an unrooted phone, i used WhatsAppKeyExtract by TripCode to extract "whatsapp.key", "msgstore.db" and "wa.db".

Using WhatsApp Viewer.exe and loading "msgstore.db.crypt8" the s/w can unlock the file with the provided "whatsapp.key" file .
When opening database with wa.db, it seems that wa.db (128kb) is not feeding into the file so contact names show up as numbers.

Am I doing something wrong?
Thank you for your time.

Provide Windows Phone support

There is no tool to extract windows phone whatsapp backups. I do not know how much effort this require. That would be fantastic if you see how much effort it takes to port your program and consider doing it.

Bitdefender antivirus detects virus

So for some reason my bitdefender antivirus detects Gen:Variant.Johnnie.26779. Virustotal get's some hits with the same results as well. Any explanations why? It would be ashame if I'm not able to safely use this app anymore...

Blackberry support

Is there any chance u can support for blackberry msgstore.db.crypt. it'll be a big help for me.

Contacts

Hey andreas,

Great work with your application, i believe you can improve it by having alot of options to it ! If it was built on C#, i would have included most of those options over time but since it's in C++ i dont feel like to miss with it. Here are things that you can add :

  • Google created new Contact API which allow you to pull all the contacts name in read-mode only which can allow you to change the numbers with a real names
  • When selecting any conversion from the Left side and start scrolling in the right side, the highlight color is barely visible, you should change the inactive highlight color
  • Drag and drop option to the application of the file
  • Shortcut for opening, quit option under file and Help-> About for your self
  • Should include exporting to Html since it's more readable then txt
  • Search option for the phone list specially when you have over 100 conv, it would be a nightmare to find your number

I might come up with some other items later on, but those items are worth having ๐Ÿ‘

Export functions

It's a great tool, my compliments.
There is one problem, in the export .html mode there aren't timestamps and in the export .txt there aren't images.
The best view is in the tool but it's not possibile to import in another document.
Thank you.

MyPhoneExplorer.

The DATA folder in the system memory is empty .
How do I find the key file?
paolo

Problem with .db file

I have a windows phone and i am using whatsapp in that the. the database file is with .db extension, since I am not able to open this file.

Chat middle border cannot be adjusted

Messages count and other colums are not readable because the grey middle bar cannot be moved. Only the horizontal scroll bar can be used to see other columns.

privacy info cleaned

image

Extracted in txt file there is no phone number

I have extracted chta history of group..
Is any way to show phone number in txt file?
I need that.. i cant save in html because i have a big history chat.. in txt file contain 2,2 Million row (126 Mb file size)
Pls help me.. Thanks

Decrypt crypt8

Hello,

After trying to decrypt db.crypt8 i have this error:

"Decryption Failed: Error during unziping (inflate)"

Work before with a previous crypt8, any ideas?

Thanks.

batch export

Would be great if you could make a bulk export option, rather than exporting individual chats.
Also, export for chats with a / forward slash character in them doesn't work.

Can't decrypt DB on Whatsapp 2.12.300

Hi Andreas!
New update, "new" issue!
With the WA updated version (5 october), the error "Decryption failed. Error during unzipping (inflate)." is back!
Can you take a look on this?
Many thanks for your work!

Viewer does not show Images

Hello...
Last time I opened a msgstore.db in the viewer, I noticed it does no longer show any thumbnails / images in the chat window.
All the chats since march 2017 dont have any images.
I'm just curious if I'm doing something wrong or did something change?

Thank you.

Message counter

Can you include a counter?

Total
Total per contact
Total send
Total received
Total received / send per contact

error loadImage () failed: could not create decoder

Hi! I have a key and msgstore.db.crypt8 files on my pc. After decrypting it there is an message "success database decrypted to file msgstore.decrypted.db". I open msgstore.decrypted.db and after clicking on some contacts i can see messages but when i click on certain contacts there is an error "loadImage () failed: could not create decoder"

problem to decrypt 8

hi andreas ,

I don't understand ,

the key of whatsapp is made , from EMAIL or from phone number?

I have installed whatsapp with one email [email protected] 1 year ago,
with a numeber phone 777-777(example)

but in a new mobil.

I have installed whatsapp with a new email [email protected] with the same number phone 777-777

i want know if the key is change to decrypt old msgstore.db.crypt8 from account [email protected]?

if I install in another phone whatsapp with old email [email protected] and with same number phone 777-777

I will have the same old key or i can't decrypt old msgstore.db.crypt8
because I registed whatsapp with new email [email protected]

or not matter the account but is important only the phone number,
and I can decypt msgstore.db.crypt8 from [email protected] and [email protected]

with new key from .new phone with [email protected]

thanks

Could not decrypt block / Decrytion failed. Error during unzipping (inflate)

Hi, since a few days (after some kind of mini upgrade of whats app, I'm getting the error "Decryption failed. Error during unzipping (inflate)"
If I try it again the same error is gone and replaced by the error "could not decrypt block" when I try to decrypt a crytp8 db.

The key I have extracted is exactly the same as before...

When I extract the key with WhatsApp KeyExtract, the replaced version of WhatsApp has to be upgrdaded after extract.

Do I need an update?!

Can't add my key file

I extracted my key using a non rooted method, and I've got it in a folder on my PC. However, when I browse into that folder through the program, it doesn't see any files in there that it can use.

SAVE CHAT BOT CONVERSATION

Hi All,

I am a beginner, I came across Azure BOT Services and created a Language Understanding Chat BOT in C#. Now I wish to save the chat in a text file can some one help me on this with some example or sample code. I have created only a simple chat bot as I am in learning process if someone can help me with some higher level chat bot also to learn, it would be greatly appreciated and helpful for my learning purpose. Thanks in advance.

Show filenames of images and videos

Last time I checked (Feb 2015), WhatsApp stored serialized Java objects in the SQLite database.
I'd need to write a Java deserializer in C++ to extract them.

~/Downloads> sqlite3 msgstore.db "select quote(thumb_image) from messages where _id = 253;"
X'ACED000573720016636F6D2E77686174736170702E4D6564696144617461FFF496EDE1A230060200044A000866696C6553697A654A000870726F67726573735A000B7472616E736665727265644C000466696C6574000E4C6A6176612F696F2F46696C653B7870000000000000DF900000000000000064017372000C6A6176612E696F2E46696C65042DA4450E0DE4FF0300014C0004706174687400124C6A6176612F6C616E672F537472696E673B78707400422F6D6E742F7364636172642F57686174734170702F4D656469612F576861747341707020496D616765732F494D472D32303132313031322D5741303030312E6A70677702002F78'

screenshot

Messages Not Showing

Thanks for this innovative app.
Unfortunately its not working for me.
I am using crypt7 and I have the crypt key, but my messages don't show.
I can't find any thing after I have decypted and opened the msgstore.decrypted file.
Please any thing am not doing right?
Thanks

Question regard bruteforce

Would you be able to speculate if bruteforcing crypt12 key would take more than years to a regular machine?

can't export my chat

Hi

I see my chats and it works as far as I can see with smaller ones but I have a big chat I wanted to export but when I tap the export button nothing happens... Idk what to do and I got the viewer only to export that chat that is bigger than 10k messages.

I hope you can help me

Thank you, joschi

sort by date

can you sort the conversations by date? the latest at the top, and show the last message time near the number in the left side...

Usage on MacBook

How do I use this on Mac OS X?

I see .sln which is Visual Studio file.

Runtime Error when trying to decrypt .crypt12 database

After I load the database and key files and press OK, I get runtime error, of which a screenshot is attached
image

I tried using another laptop and the same error showed, so it could be related to my own files? I'm not sure & I don't have other files to try.

Chats

I think you should include the chat id
GROUP BY chat_list.key_remote_jid, chat_list.subject, chat_list.creation, chat_list._id
in case 2 chats have the same creation time.
Also, it seems that the chat creation times are not use when showing new chats in UI.

Dates are shown in US format

Dates are shown in US format

2017.11.05 instead of 05.11.2017 EU format

This is non selectable or does not follow Windows settings.

Voice File Names

Hi, It would be realy nice if "Whatsapp viewer" could show the real name of voice messages. I know there are stored into database. In this version it only shows senders's file message voice and most of them are wrong.

Thank you.

message sort issue

Hello,
I think there wrong in message sorting, the conversation not sort well, please check.

Regards,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.