逆向微信 PC 客户端,实现消息接收,选择聊天对象后通知功能,封装成库供客户调用。
启动微信时生成随机 channelId 并与 websocket 服务器建立链接,并将 channelId 保存于文件中
当聊天对象(个人或群)发生变化时通过websocket发送json数据
{
“channelId”: “channelId”,
“content”: “WXID,NICKNAME”,
“type”: “ChatDidChange”
}
当接收到消息时通过websocket发送json数据
{
“channelId”: “channelId”,
“content”: “hello”,
“from”: “from WXID”,
“to”: “to WXID”,
“msgTime”: “1540789066”,
“msgType”: “10001”,
“type”: “msgRecv”
}
接收到 websocket 服务器的消息并执行
发送消息
{
“type”: “sendMsg”,
“wxid”: “WXID”,
“content”: “CONTENT”
}
需求方专属客服,免费梳理匹配
添加客服微信,免费为您安排与该工程师直接沟通
长按二维码添加客服微信
如当前档期不合,也可免费为您推荐相似案例作者