Giter VIP home page Giter VIP logo

wechat-dump's Introduction

Dump WeChat Messages from Android

WeChat(微信), as the most popular mobile IM app in China, failed to allow users to export well-formatted chat history. This tool can parse and dump WeChat chat history on a rooted android phone.

How to use:

Dependencies:

  • python-PIL
  • PyQuery
  • pysox
  • python-csscompressor(optional)
  • adb and rooted android phone connected to PC

Get Necessary Data:

  • Get decrypted WeChat database (Linux only):
    • Automatic: ./android-interact.sh db_decrypt
    • Manual:
      • Get /data/data/com.tencent.mm/MicroMsg/long-long-name/EnMicroMsg.db from root filesystem, possible ways are:
        • ./android-interact.sh db
        • Use your rooted file system manager app
      • Get WeChat uin, possible ways are:
        • ./android-interact.sh uin
        • Login to web wechat, get wxuin=1234567 from document.cookie
      • Get your phone IMEI number, possible ways are:
        • ./android-interact.sh imei
        • Call *#06# on your phone
        • Find IMEI in system settings
      • Decrypt database, will produce decrypted.db:
       ./decrypt_db.sh <path to EnMicroMsg.db> <imei> <uin>
      
  • Get WeChat user resource directory from your phone to resource directory:
    • ./android-interact.sh res # you might need to change the resource location in this script if the default doesn't work

Run:

  • Parse and dump text messages of every contact (resource directory is not required to run this):
./dump_msg.py decrypted.db output_dir
  • Dump messages of one contact to rich-content html, containing voice messages, emojis, and images:
./dump_html.py decrypted.db resource <contact name> output.html

Examples:

See here for an example html.

Screenshots:

byvoid

TODO

  • Search by uid/username
  • Skip existing files when copying android resources
  • Fix rare unhandled types: > 10000 and < 0
  • Better user experiences... see grep 'TODO' lib -R
  • mac support (For now you will have to compile sqlcipher 2.1.1 by yourself. Also, shell script might work on BSD)
  • more easy-to-use for non-programmers (GUI?)

Disclaimers

This tool is still under development and testing, therefore it might not work very well on every device.

Use this software at your own risk. The author is not responsible for any potential damage/loss/privacy issues related to the use of this tool.

wechat-dump's People

Contributors

ppwwyyxx avatar vuryleo 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.