GithubHelp home page GithubHelp logo

zhouao / weixin-xposed-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from itlaonong/weixin-xposed-server

0.0 0.0 0.0 131 KB

微信http服务器形式的xposed模块,提供http api,让你可以控制微信主动发送消息

Java 100.00%

weixin-xposed-server's Introduction

weixin-xposed-server

微信http服务器形式的xposed模块,提供http api,让你可以控制微信主动发送消息

为了防止被人恶意调用接口。我增加了Google二次认证形式的安全校验,调用接口时,必须附上动态码,手机上的服务器校验通过后才会发送微信消息。因为是动态码,有时效性,就算被人拦截也不会有太大的影响。比直接传递密码安全多了。需要注意,因为是基于时间的动态码,调用方和服务方必须时间同步才行,至少不能相差太多。

使用方式就是配置Constants中的seed,调用方使用相同seed生成动态码,调用是附上(token字段),即可。

例如手机ip是192.168.0.3

POST方式访问http://192.168.0.3:9000

报文为:

{
    "token": "504655",//换成自己的动态码
    "message": {
        "userId": "wxid_****", //接受方微信id
        "content": "Hello World" //消息内容,暂时只支持文本消息,注意微信对文本消息有长度限制,超过限制会发送失败
    }
}

另外,因为微信会调整不同版本手机app的api,这个xposed模块我是在微信7.0.3版本下使用,其他版本不知道是否适用。

TODO

  1. 增加微信新消息转发(来新消息通过http请求转发到自己系统中)

  2. 增加微信联系人获取接口(微信收到信息时,chatroom是对方的微信id,需要通过通讯录才能转换为看得懂得样子)

  3. 相关参数可配置(目前seed和端口号9000都是写在代码里面,不能修改)

weixin-xposed-server's People

Contributors

loanon avatar itlaonong 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.