diff --git a/README.md b/README.md index e1490f1..0c1901d 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ If the tool works for you, please take a moment to __add your phone/OS to__ [the + Automatic: `./android-interact.sh db`. It may use an incorrect userid. + Manual: + Figure out your `${userid}` by inspecting the contents of `/data/data/com.tencent.mm/MicroMsg` on the __root__ filesystem of the device. It should be a 32-character-long name consisting of hexadecimal digits. - + Get `/data/data/com.tencent.mm/MicroMsg/${userid}/{EnMicroMsg.db,sfs/avatar.index}` from the device. + + Get `/data/data/com.tencent.mm/MicroMsg/${userid}/EnMicroMsg.db` from the device. 2. Decrypt database file: + Automatic: `./decrypt-db.py decrypt --input EnMicroMsg.db` + Manual: diff --git a/dump-html.py b/dump-html.py index 80088e8..02825a2 100755 --- a/dump-html.py +++ b/dump-html.py @@ -17,7 +17,7 @@ def get_args(): parser.add_argument('name', help='name of contact') parser.add_argument('--output', help='output html file', default='output.html') parser.add_argument('--db', default='decrypted.db', help='path to decrypted database') - parser.add_argument('--avt', default='avatar.index', help='path to avatar.index file') + parser.add_argument('--avt', default='avatar.index', help='path to avatar.index file that only exists in old version of wechat') parser.add_argument('--res', default='resource', help='reseource directory') args = parser.parse_args() return args diff --git a/wechat/res.py b/wechat/res.py index d70c486..6c2fc12 100644 --- a/wechat/res.py +++ b/wechat/res.py @@ -30,6 +30,11 @@ JPEG_QUALITY = 50 class Resource(object): """ multimedia resources in chat""" def __init__(self, parser, res_dir, avt_db): + """ + Args: + res_dir: path to the resource directory + avt_db: "avatar.index" file that only exists in old versions of wechat + """ def check(subdir): dir_to_check = os.path.join(res_dir, subdir) assert os.path.isdir(dir_to_check), f"No such directory: {dir_to_check}"