Code Monkey home page Code Monkey logo

whatsapp-exporter's Introduction

WhatsApp Exporter

A python script for extracting WhatsApp conversations from the app's SQLite database and exporting them as HTML or txt files.

Screenshot

Features

  • Export WhatsApp chats to a WhatsApp Web like HTML page.
  • Export WhatsApp chats to txt files (one per chat).

Usage

  1. Prerequisite: The Whatsapp database files must be available (see the following section).
  2. Supply all configuration values in config.cfg. Here, the paths to the database files must be given. The wa.db database is only needed for adding names of contacts and does not need to be used.
  3. Run the main script.
python3 main.py

Retrieving WhatsApp Databases

For retrieving the WhatsApp database files from an Android device there are several options. Two of them are described in this section.

Option A

WhatsApp stores all messages in SQLite databases in the app directory /data/data/com.whatsapp/. These can be downloaded to a computer using adb, e.g. when the Android device is booted to a recovery such as TWRP (or when the device is rooted). Copy all WhatsApp files to the local directory my_WhatsApp using the following command.

adb pull /data/data/com.whatsapp/ my_WhatsApp/

The directory my_WhatsApp now contains the following relevant files:

  • com.whatsapp/databases/msgstore.db: The database for storing all messages.
  • com.whatsapp/databases/wa.db: The database for storing contacts.

Option B

It is also possible to decrypt a WhatsApp backup file. These backups are generated by WhatsApp and can be found in the publicly accessible device storage (e.g. sdcard0/WhatsApp/Databases/msgstore.db.crypt12). Obviously, the decryption key (which is stored in the app's private storage) is still required. The tool WhatsApp-Crypt12-Decrypter can be used to decrypt a backup file:

python3 decrypt12.py key msgstore.db.crypt12 msgstore.db

License

This project is licensed under the GNU General Public License v3.0.

This project is not endorsed or certified by WhatsApp Inc.

whatsapp-exporter's People

Contributors

goblincomet avatar

Watchers

 avatar

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.