From 3993b8e8b5068e05c9f36328f5d8b82d03cc3709 Mon Sep 17 00:00:00 2001 From: ppwwyyxx Date: Fri, 9 Jan 2015 12:06:09 +0800 Subject: [PATCH] add automatic db decrypt --- README.md | 31 +++++++++++++++++-------------- android-interact.sh | 8 +++----- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 1e2d0b0..1ba59e7 100644 --- a/README.md +++ b/README.md @@ -12,24 +12,27 @@ This tool can parse and dump WeChat chat history on a rooted android phone. + python-csscompressor(optional) #### Get Necessary Data: -+ 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 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](https://wx.qq.com), 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 + ``` + Get WeChat user resource directory from your phone: + `./android-interact.sh res` # you might need to change the resource location in this script if the default doesn't work -+ Get WeChat uin, possible ways are: - + `./android-interact.sh uin` - + Login to [web wechat](https://wx.qq.com), 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 #### Run: -+ Decrypt database, will produce decrypted.db (for now, Linux only): -``` -./decrypt_db.sh -``` + Parse and dump text messages of every contact: ``` ./dump_msg.py decrypted.db output_dir diff --git a/android-interact.sh b/android-interact.sh index 0ae4d63..8c7a714 100755 --- a/android-interact.sh +++ b/android-interact.sh @@ -1,6 +1,6 @@ #!/bin/bash -e # File: android-interact.sh -# Date: Wed Jan 07 21:57:59 2015 +0800 +# Date: Fri Jan 09 12:03:57 2015 +0800 # Author: Yuxin Wu PROG_NAME=`readlink -f "$0"` PROG_DIR=`dirname "$PROG_NAME"` @@ -66,7 +66,7 @@ elif [[ $1 == "db" || $1 == "res" ]]; then exit 1 } fi -elif [[ $1 == "all" ]]; then +elif [[ $1 == "db_decrypt" ]]; then echo "Getting uin..." $0 uin | tail -n1 | grep -o '[0-9]*' > /tmp/uin echo "Getting imei..." @@ -76,9 +76,7 @@ elif [[ $1 == "all" ]]; then echo "Decrypting db..." ./decrypt_db.sh EnMicroMsg.db $(" exit 1