From 58ce6ea8532f4866d1bc3cc4f3eac53ae5c51e26 Mon Sep 17 00:00:00 2001 From: Yuxin Wu Date: Sat, 27 Jun 2020 19:45:42 -0700 Subject: [PATCH] update readme --- README.md | 14 ++++---------- android-interact.sh | 8 ++------ wechat/msgslice.py | 6 +++--- 3 files changed, 9 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 134d58d..c02d444 100644 --- a/README.md +++ b/README.md @@ -7,15 +7,6 @@ This tool can parse and export WeChat messages on a rooted android phone. Right now it can dump messages in text-only mode, or generate a single-file html containing voice messages, images, emoji, etc. -__NEWS__: WeChat 6.0+ uses silk to encode audio. The code is updated. - -__NEWS__: WeChat 6.3 uses a new avatar storage. The code is updated. - -__HELP NEEDED__: Starting from May 2016, the first 1KB of all emojis in `resource/emoji` are encrypted. Right now I'm using emoji URL which covers most of them. - -If you are good at cryptography / reverse engineereing, or you work at Tencent, feel free to contact me or help take a look. -It is also possible to recover the image without knowing the first 1KB (just have to detect chunks without knowing metadata), but I don't have time to do that either. - If this tools works for you, please take a moment to __add your phone/OS to__ [the wiki](https://github.com/ppwwyyxx/wechat-dump/wiki). If it doesn't work, you probably have to investigate it as the behavior may be different on each phone. @@ -115,7 +106,10 @@ Screenshots of generated html: See [here](http://ppwwyyxx.com/static/wechat/example.html) for an example html. ### TODO List -+ Attack the emoji encryption problem ++ Crack emoji encryption to handle some missing emojis. + * __HELP WANTED__: Starting from May 2016, the first 1KB of all emojis in `resource/emoji` are encrypted. Right now I'm using emoji URL which covers most of them. + Any thoughts on how they are encrypted are appreciated. + It is also possible to recover the image without knowing the first 1KB (just have to detect chunks without knowing metadata). + Fix rare unhandled message types: > 10000 and < 0 + Better user experiences... see `grep 'TODO' wechat -R` diff --git a/android-interact.sh b/android-interact.sh index c4b9d2d..858cdc6 100755 --- a/android-interact.sh +++ b/android-interact.sh @@ -53,15 +53,11 @@ if [[ $1 == "db" || $1 == "res" ]]; then adb pull $MM_DIR/MicroMsg/$chooseUser/EnMicroMsg.db [[ -f EnMicroMsg.db ]] && \ echo "Database successfully downloaded to EnMicroMsg.db" || { - >&2 echo "Failed to pull database by adb" + >&2 echo "Failed to pull database by adb!" exit 1 } adb pull $MM_DIR/MicroMsg/$chooseUser/sfs/avatar.index - [[ -f avatar.index ]] && \ - echo "Avatar index successfully downloaded to avatar.index" || { - >&2 echo "Failed to pull avatar index by adb, are you using latest version of wechat?" - exit 1 - } + [[ -f avatar.index ]] && echo "Avatar index successfully downloaded to avatar.index" fi else echo "Usage: $0 " diff --git a/wechat/msgslice.py b/wechat/msgslice.py index 2d4d8c4..c80a645 100644 --- a/wechat/msgslice.py +++ b/wechat/msgslice.py @@ -1,6 +1,6 @@ # -*- coding: UTF-8 -*- -class MessageSlicerByTime(object): +class MessageSlicerByTime: """ Separate messages into slices by time, for time display in html. A new day always begins a new slice. @@ -28,11 +28,11 @@ class MessageSlicerByTime(object): assert len(msgs) == sum([len(k) for k in ret]) return ret -class MessageSlicerBySize(object): +class MessageSlicerBySize: """ Separate messages into slices by max slice size, to avoid too large html. """ - def __init__(self, size=2000): + def __init__(self, size=1500): """ a slice will have <= 1.5 * cnt messages""" self.size = size assert self.size > 1