Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

能不使用adb直接本地解码EnMicroMsg.db吗 #67

Closed
Huelse opened this issue Jul 17, 2020 · 3 comments
Closed

能不使用adb直接本地解码EnMicroMsg.db吗 #67

Huelse opened this issue Jul 17, 2020 · 3 comments

Comments

@Huelse
Copy link

Huelse commented Jul 17, 2020

我已经将EnMicroMsg.db文件imei和uin全获取到,能否直接在电脑上解码?不链接手机用adb
直接运行时显示如下结果:

[20:18:01 31@procutil.py:wechat.common.procutil] Command 'adb root' failed, return code=1
Traceback (most recent call last):
  File "D:\HG\Downloads\SD\wechat-dump-master\wechat\common\procutil.py", line 21, in subproc_call
    shell=True, timeout=timeout)
  File "D:\Projects\Lib\Python\Python36\lib\subprocess.py", line 356, in check_output
    **kwargs).stdout
  File "D:\Projects\Lib\Python\Python36\lib\subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'adb root' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "decrypt-db.py", line 153, in <module>
    subproc_succ("adb root")
  File "D:\HG\Downloads\SD\wechat-dump-master\wechat\common\procutil.py", line 43, in subproc_succ
    output, ret = subproc_call(cmd)
  File "D:\HG\Downloads\SD\wechat-dump-master\wechat\common\procutil.py", line 32, in subproc_call
    logger.warn(e.output.decode('utf-8'))
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb2 in position 6: invalid start byte
@Huelse
Copy link
Author

Huelse commented Jul 17, 2020

我修改了下代码,发现uin编码有问题

Traceback (most recent call last):
  File "decrypt-db.py", line 184, in <module>
    key = get_key(imei, uin)
  File "decrypt-db.py", line 123, in get_key
    a = md5(imei + uin)
TypeError: must be str, not bytes

@Huelse
Copy link
Author

Huelse commented Jul 17, 2020

问题解决,167行改key = get_key(str(imei).encode('ascii'), uin)

@Huelse Huelse closed this as completed Jul 17, 2020
ppwwyyxx added a commit that referenced this issue Jul 17, 2020
@ppwwyyxx
Copy link
Owner

./decrypt-db.py decrypt --uin xxx --imei xxx --input xxx.db works after 9b64982

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants