参考项目:https://github.com/JaveleyQAQ/WeChatOpenDevTools-Python
环境:python 3.12.4
微信:3.9.8.25
https://weixin.qq.com/cgi-bin/readtemplate?lang=zh_CN&t=weixin_faq_list&head=true
https://github.com/tom-snow/wechat-windows-versions/releases
python main.py -c 调试内置浏览器,他会自动查询微信安装位置,利用frida注入hook代码到微信
踩坑点,注意python和frida的适用平台要一样最好x86否则报错执行失败。
def inject_wechatDLL(self, path, code):
print(f"Injecting DLL into process at path: {path}")
pid = self.device.spawn(path)
session = frida.attach(pid)
script = session.create_script(code)
script.on("message", self.onMessage)
script.load()
# self.device.resume(pid)
time.sleep(10)
session.detach()
# sys.stdin.read()