Coder Social home page Coder Social logo

huangzheng2016 / comwechatrobot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ljc545w/comwechatrobot

3.0 0.0 0.0 8.71 MB

PC微信机器人,实现获取通讯录,发送文本、图片、文件等消息,封装COM接口供Python、C#调用

C++ 61.61% C 32.52% Python 4.83% C# 1.04%

comwechatrobot's Introduction

描述

PC微信机器人,实现以下功能:

  1. 获取通讯录
  2. 发送文本、图片、文件、xml文章、名片、群艾特消息
  3. 根据wxid查询好友信息
  4. 根据群ID获取所有群成员wxid
  5. 检测好友状态(是否好友、被删除、被拉黑)
  6. 接收各类消息,可写回调函数进行处理
  7. 封装COM接口,方便使用自己喜欢的语言进行调用

用途

  1. 淘客发单
  2. 无痕清粉
  3. 微信公众号采集
  4. 聊天记录备份
  5. 其他你能想到的用途

可用版本

微信电脑版3.5.0.46
微信电脑版3.6.0.18
主分支对应微信3.6.0.18版本,其他版本请查看对应分支。

编译环境

Visual Studio 2019(平台配置:win32(x86))

原理

通过逆向PC微信,定位到关键CALL,dll内联汇编调用
注册32位COM组件,供64位/32位进程外部调用

目录说明

./CWeChatRobot:COM组件的实现代码
./DWeChatRobot:注入的DLL实现代码
./wxRobot: 包含C#的调用示例
./Python:python示例和接口测试文件
./Release/CWeChatRobot.exe:编译的COM组件
./Release/DWeChatRobot.dll:编译的DLL文件
./Release/WeChatTools.exe:用于调试时注入或卸载DLL程序,具体参阅相关代码

注册COM

以管理员权限执行以下命令:

# 安装
CWeChatRobot.exe /regserver
# 卸载
CWeChatRobot.exe /unregserver

调用

Python:
参考wxRobot.py
C#:
参考Program.cs

更多功能

已找到如下功能的CALL或HOOK位置:

  1. 未加密图片数据
  2. 未加密聊天表情
  3. 语音消息(SILK_V3格式)
  4. 微信Duilib界面xml文件

暂时没有空闲时间开发上述功能,如果想开发相关功能请发邮件到[email protected]
也欢迎您提交PR

更新记录

2022.04.01

  1. 使用SAFEARRAY返回通讯录列表,可正确显示好友昵称中的特殊符号
  2. README中添加目录说明
  3. 更新C#示例代码,添加好友列表的遍历示例

2022.04.11

  1. 修改获取个人信息接口和发送文章接口,兼容老版wxid(未经测试,如有问题请提ISSUE)
  2. 添加接收消息的接口,可以写回调对消息进行处理(参考Python示例文件)

2022.04.12

  1. 添加发送群艾特消息的接口

2022.04.12

  1. 添加通过群ID获取所有群成员wxid接口

2022.04.13

  1. 更新群艾特接口,可同时艾特多人

2022.04.18

  1. 添加获取数据库句柄接口(部分句柄,获取全量句柄需Hook)
  2. 添加执行SQL命令接口
  3. 添加在线数据库备份接口

打赏作者

请给作者一个star,感谢感谢

免责声明

代码仅供交流学习使用,请勿用于非法用途和商业用途!如因此产生任何法律纠纷,均与作者无关!

comwechatrobot's People

Contributors

ljc545w avatar

Stargazers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.