Giter VIP home page Giter VIP logo

wechatstudy's Introduction

WeChatStudy

StudyWechat,theoretically the following versions are supported:

  • 3.7.6.44
  • 3.8.0.33

The project is for study only, it is prohibited to use it for illegal purposes.

项目仅供学习参考,禁止用于非法用途。

项目说明

WeChatDLL为核心DLL,作用为搭建一个http服务。

WeChatClient为客户端,通过http协议与微信通讯,使用前需要安装以下python库。

pip3 install pywin32
pip3 install numpy
pip3 install pefile

作者本人并没有使用该项目的需求,因此该项目的代码几乎未进行测试。

项目源码搭建

1、安装Visual Studio,运行WeChatGUI.sln工程文件,编译DLL。

2、项目使用到了libprotobuf-lite库,因此你需要自行编译,传送门

https://github.com/protocolbuffers/protobuf/releases

API接口说明

接收消息

resp = requests.get("http://127.0.0.1:5000/syncMsg")
print(resp.text)

接收朋友圈消息(不推荐频繁调用)

resp = requests.get("http://127.0.0.1:5000/syncSns")
print(resp.text)

获取通讯录列表

resp = requests.get("http://127.0.0.1:5000/getContactList")
print(resp.text)

获取通讯录

contactList = []
contactList.append("filehelper")
resp = requests.post("http://127.0.0.1:5000/getContactInfo",json = contactList)
print(resp.text)

发送文本消息

data = dict()
data["to_wxid"] = "filehelper"
data["msg"] = "hello wechat"
resp = requests.post("http://127.0.0.1:5000/sendTextMsg", json = data)
print(resp.text)

发送图片

data = dict()
data["to_wxid"] = "filehelper"
data["image_path"] = '''D:\\test.png'''
resp = requests.post("http://127.0.0.1:5000/sendImageMsg", json = data)
print(resp.text)

发送文件

data = dict()
data["to_wxid"] = "filehelper"
data["file_path"] = '''D:\\test.bin'''
resp = requests.post("http://127.0.0.1:5000/sendFile", json = data)
print(resp.text)

wechatstudy's People

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.