随笔 - 298  文章 - 377  trackbacks - 0
<2016年9月>
28293031123
45678910
11121314151617
18192021222324
2526272829301
2345678

常用链接

留言簿(34)

随笔分类

随笔档案

文章档案

相册

收藏夹

搜索

  •  

最新评论

阅读排行榜

评论排行榜


昨天是周末,在家闲得无聊,于是去weiphone.com逛了一圈,偶然发现有人发了一帖叫《微信 for Mac》, 这勾起了我的好奇心,国内做Mac开发的人确实很少,对于那些能够独自开发一些Mac第三方工具的开发者我都表示很敬畏,于是点进去看了一个究竟,如果你 们好奇也可以点进去看个明白,我最终得出的结论就是:坑爹呢这是!直接用一个WebView去加载了wx.qq.com这个网页也敢自称是微信For Mac?对于这种欺骗用户的行为我十分不屑,同时也让我在思考在微信不提供API的环境下开发一款原生的微信Mac版本是否可行,最有可能的就是去分析微 信Web版本的通信过程,然后在程序中模拟这个流程,在我苦苦研究了一个下午之后,终于摸透了这个过程,并用程序实现了大部分功能,下面就详细解说一下微 信Web版的流程:

1.微信服务器返回一个会话ID

微信Web版本不使用用户名和密码登录,而是采用二维码登录,所以服务器需要首先分配一个唯一的会话ID,用来标识当前的一次登录,通过请求地址:

https://login.weixin.qq.com /jslogin?appid=wx782c26e4c19acffb&redirect_uri=https%3A%2F %2Fwx.qq.com%2Fcgi-bin%2Fmmwebwx-bin%2Fwebwxnewloginpage&fun=new& amp;lang=zh_CN&_=1377482012272(其中1377482012272这个值是当前距离林威治标准时间的毫秒)

服务器会返回如下的字符串:

window.QRLogin.code = 200; window.QRLogin.uuid = “DeA6idundY9VKn”;

而这个DeA6idundY9VKn字符串就是微信服务器返回给我们的ID。

2.通过会话ID获得二维码

既然微信Web版本是通过二维码进行登录,如何获得这个随机的二维码呢?答案就是利用刚才获得的ID去请求服务器生成的二维码,通过上面的ID我们组合得到以下的URL地址:

https://login.weixin.qq.com/qrcode/DeA6idundY9VKn?t=webwx

该请求返回的便是我们需要的二维码,此时需要用户在微信的手机版本中扫描这个二维码(我就搞不明白微信官方是如何想的,登录Web版本竟然还需要手机微信去配合登录,难道没有考虑我被迫选择Web微信就是因为手机不在身边这样的情形么?)

3.轮询手机端是否已经扫描二维码并确认在Web端登录

当获得二维码之后,就需要用户去手机端去扫描二维码,并获得用户的授权,此时我们并不知道用户何时完成这个操作,所以我们只有轮询,而轮询的地址就是:

https://login.weixin.qq.com/cgi-bin/mmwebwx-bin/login?uuid=DeA6idundY9VKn&tip=1&_=1377482045264(注意UUID和最后时间这两个参数)

如果服务器返回:

window.code=201;

则说明此时用户在手机端已经完成扫描,但还没有点击确认;

如果服务器返回:

window.redirect_uri=一个URL地址

则说明此时用户已经在手机端完成了授权过程,保存下这个URL地址下一步骤中使用。

4.访问登录地址,获得uin和sid

通过访问上一步骤中获得的URL地址,可以在服务器返回的Cookies中获得到wxuin和wxsid这两个值,这两值在后续的通信过程中都要使用到这两个值,并且Cookies中也需要包括这两项。

5.初使化微信信息

前面的步骤算是完成了这个复杂的登录过程,如果我们需要使用微信就需要获得当前用户的信息、好友列表等,还有一个关键的就是同步信息(后续与服务器轮询中需要使用同步信息),通过访问以下的链接:

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxinit?r=1377482058764(r依然是时间)

访问该链接需要使用POST,并且在Body中带上以下的JSON信息:

{"BaseRequest":
{"Uin":"2545437902","Sid":"QfLp+Z+FePzvOFoG","Skey":"","DeviceID":"e1615250492"}}

这个JSON串中Uin和Sid分别是上面步骤中获得的那两个Cookie值,DeviceID是一个本地生成的随机字符串(分析了官方的总是e+一串数字,所以我们也保持这样的格式)。

服务器就会返回一个很长的JSON串,这其中包括:BaseResponse中的值用来表示请求状态码,ContactList主要用来表示联系人(此列表不全,只包括了类似通讯录助手、文件助手、微信团队和一些公众帐号等,后面会通过另一接口去获得更全面的信息),SyncKey是用户与服务器同步的信息,User就是当前登录用户自己的信息。

6.获得所有的好友列表

在上一步骤中已经获得了部分好友和公众帐号,如果需要获得完整的好友信息,就需要访问以下的链接:

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxgetcontact?r=1377482079876(r依然是时间)

访问该链接同样需要POST方式,但Body为空JSON:{},服务器对身份的判定是通过Cookies,所以需要保持之前访问的Cookies不被修改(在Objective-C中会自动保存相关的Cookies,无需程序特殊处理),在返回的JSON串中,MemberList中就包含了所有的好友信息。

7.保持与服务器的信息同步

与服务器保持同步需要在客户端做轮询,该轮询的URL如下:

https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?callback=jQuery18309326978388708085_1377482079946&r=1377482079876&
sid=QfLp+Z+FePzvOFoG&uin=2545437902&deviceid=e1615250492&synckey=(见以下说明)&_=1377482079876

其中的参数r和_都是time,sid,uin,deviceid与上面步骤的值相对应,此处的synkey是上步步骤获得的同步键值,但需要按一定的规则组合成以下的字符串:

1_124125|2_452346345|3_65476547|1000_5643635

就是将键和值用_隔开,不同的键值对用|隔开,但记得|需要URL编码成%7C,通过访问上面的地址,会返回如下的字符串:

window.synccheck={retcode:”0”,selector:”0”}

如果retcode中的值不为0,则说明与服务器的通信有问题了,但具体问题我就无法预测了,selector中的值表示客户端需要作出的处理,目前已经知道当为6的时候表示有消息来了,就需要去访问另一个接口获得新的消息。

8.获得别人发来的消息

当一个步骤中知道有新消息时,就需要去获取消息内容,通过访问以下的链接:

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxsync?sid=QfLp+Z+FePzvOFoG&r=1377482079876

上面链接中的参数sid对应上面步骤中的值,r为时间,访问链接需要使用POST方式,Body中包括JSON串,该JSON串格式如下:

{"BaseRequest" : {"Uin":2545437902,"Sid":"QfLp+Z+FePzvOFoG"},
"SyncKey" : {"Count":4,"List":[{"Key":1,"Val":620310295},{"Key":2,"Val":620310303},{"Key":3,"Val":620310285},{"Key":1000,"Val":1377479086}]},
"rr" :1377482079876};

以下的信息中BaseRequest中包括的Uin与Sid与上面步骤中的值对应,SyncKey也是上面步骤中获得的同步键值对,rr为时间,访问成功之后服务器会返回一个JSON串,其中AddMsgList中是一个数组,包含了所有新消息。

9.向用户发送消息

用户主动发送消息,通过以下的URL地址:
https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxsendmsg?sid=QfLp+Z+FePzvOFoG&r=1377482079876
上面的sid和r参数不再解释了,访问该URL采用POST方式,在Body中的JSON串形如以下的格式:

{
"BaseRequest":{
"DeviceID" : "e441551176",
"Sid" : "S8wNi91Zry3024eg",
"Skey" : "F820928BBA5D8ECA23448F076D2E8A915E1349E9FB4F4332",
"Uin" : "2545437902"
},
"Msg" : {
"ClientMsgId" : 1377504862158,
"Content" : "hello",
"FromUserName" : "wxid_2rrz8g8ezuox22",
"LocalID" : 1377504862158,
"ToUserName" : "wxid_j4nu420ojhsr21",
"Type" : 1
},
"rr" = 1377504864463
}

其中BaseRequest都是授权相关的值,与上面的步骤中的值对应,Msg是对消息的描述,包括了发送人与接收人,消息内容,消息的类型(1为文本),ClientMsgId和LocalID由本地生成。rr可用当前的时间。
在返回JSON结果中BaseResponse描述了发送情况,Ret为0表示发送成功。


网页微信客户端封包大全

http://www.langyeweb.com/Program/70.html

网页版微信功能只有一个:聊天。根据 Copyright (C) 狼夜我这两天研究发现, 网页版微信可以脱离手机微信,也就是手机微信退出、手机关机,都不影响网页端微信的 在线以及聊天,关于如何使用加好友、朋友圈、摇一摇功能,我有个思路就是抓手机封包 @Icenowy 在微博上有抓手机包的计划 然后使用,不过这个想法因为时间问题没有去实践, 希望大家能研究出来的话在本页面留一个链接,十分感谢!

以下是Post/Get的封包大全,如果能看懂这个,基本上你就可以做出来了。

获取uuid

https://login.weixin.qq.com/jslogin?appid=wx782c26e4c19acffb&redirect_uri=https%3A%2F%2Fwx.qq.com%2Fcgi-bin%2Fmmwebwx-bin%2Fwebwxnewloginpage&fun=new&lang=zh_CN&_=1388994062250

获取二维码

https://login.weixin.qq.com/qrcode/{$uuid}?t=webwx

等待扫描Get

https://login.weixin.qq.com/cgi-bin/mmwebwx-bin/login?uuid=454d958c7f6243&tip=1&_=1388975894359

https://login.weixin.qq.com/cgi-bin/mmwebwx-bin/login?uuid=454d958c7f6243&tip=1&_=1388975873359

https://login.weixin.qq.com/cgi-bin/mmwebwx-bin/login?uuid=454d958c7f6243&tip=1&_=1388975883859

扫描了(但还没有确认)-返回

window.code=201;

未扫描返回空

扫描之后-第一次请求成功

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxstatreport?type=1&r=1388975895453

{"BaseRequest":{"Uin":0,"Sid":0},"Count":1,"List":[{"Type":1,"Text":"/cgi-bin/mmwebwx-bin/login, First Request Success, uuid: 454d958c7f6243"}]}

扫描之后-第二次请求开始

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxstatreport?type=1&r=1388975895453

{"BaseRequest":{"Uin":0,"Sid":0},"Count":1,"List":[{"Type":1,"Text":"/cgi-bin/mmwebwx-bin/login, Second Request Start, uuid: 454d958c7f6243"}]}

等待确认Get

https://login.weixin.qq.com/cgi-bin/mmwebwx-bin/login?uuid=454d958c7f6243&tip=0&_=1388975895453

https://login.weixin.qq.com/cgi-bin/mmwebwx-bin/login?uuid=454d958c7f6243&tip=0&_=1388975900953

https://login.weixin.qq.com/cgi-bin/mmwebwx-bin/login?uuid=454d958c7f6243&tip=0&_=1388975906453

https://login.weixin.qq.com/cgi-bin/mmwebwx-bin/login?uuid=454d958c7f6243&tip=0&_=1388975911953

手机确认-返回

window.code=200;

window.redirect_uri="https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxnewloginpage?ticket=03f725a8039d418ab79c69b6ffbd771b&lang=zh_CN&scan=1388975896";

未确认返回空

get 登陆获取Cookie

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxnewloginpage?ticket=03f725a8039d418ab79c69b6ffbd771b&lang=zh_CN&scan=1388975896&fun=new

WX2新协议

https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxnewloginpage?ticket=b03aa3dfbe8d4130981ddf771137ae7b&lang=zh_CN&scan=1419126125&fun=old

设置Cookie 返回一个状态

post 第二次请求成功

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxstatreport?type=1&r=1388976086218

{"BaseRequest":{"Uin":0,"Sid":0},"Count":1,"List":[{"Type":1,"Text":"/cgi-bin/mmwebwx-bin/login, Second Request Success, uuid: 454d958c7f6243, time: 190765ms"}]}

post 表示登陆成功-返回重要的数据SKey

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxinit?r=1388976086484

DeviceID 是e + 随机数

http://www.tanhao.me/talk/1466.html

{"BaseRequest":{"Uin":"750366800","Sid":"e75TXbI7TnKUevmI","Skey":"","DeviceID":"e519062714508114"}}

post 应该是向服务器端提供的一次验证-返回SyncKey

http://freezingsky.iteye.com/blog/2055502

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxsync?sid=e75TXbI7TnKUevmI&r=1388976086734

{"BaseRequest":{"Uin":750366800,"Sid":"e75TXbI7TnKUevmI"},"SyncKey":{"Count":4,"List":[{"Key":1,"Val":620916854},{"Key":2,"Val":620917961},{"Key":3,"Val":620917948},{"Key":1000,"Val":1388967977}]},"rr":1388976086734}

post 可能是获取当前会话列表

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxgetcontact?r=1388976086734

{}

post 可能是在手机上显示的提示信息

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxstatusnotify?r=1388976086750

{"BaseRequest":{"Uin":750366800,"Sid":"e75TXbI7TnKUevmI","Skey":"","DeviceID":"e519062714508114"},"Code":3,"FromUserName":"langyeie","ToUserName":"langyeie","ClientMsgId":"1388976086750"}

get 获取头像图片

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxgeticon?seq=1388335457&username=langyeie

get 同理可以获取其他微信好友的头像

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxgeticon?seq=620917759&username=wxid_xx3mtgeux5511

post 更改什么状态?标记已读?

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxbatchgetcontact?type=ex&r=1388976086812

{"BaseRequest":{"Uin":750366800,"Sid":"e75TXbI7TnKUevmI","Skey":"","DeviceID":"e519062714508114"},"Count":10,"List":[{"UserName":"z_zer0v","ChatRoomId":3445229833},{"UserName":"huobao002","ChatRoomId":3445229833},{"UserName":"wxid_jo4qxoep4go411","ChatRoomId":3445229833},{"UserName":"jijunlong123456","ChatRoomId":3445229833},{"UserName":"wxid_toyaj4qwrynb21","ChatRoomId":3445229833},{"UserName":"wxid_6655286553012","ChatRoomId":3445229833},{"UserName":"wxid_rankrke1kkyd12","ChatRoomId":3445229833},{"UserName":"wxid_chcblpm846k022","ChatRoomId":3445229833},{"UserName":"tw297554396","ChatRoomId":3445229833},{"UserName":"wxid_3076050756212","ChatRoomId":3445229833}]}

聊天室头像

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxgetheadimg?seq=620917806&username=3445229833chatroom@

get 监听会话

https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?callback=jQuery18308660551080269895_1388975862078&r=1388976091937&sid=e75TXbI7TnKUevmI&uin=750366800&deviceid=e519062714508114&synckey=1_620916854%7C2_620917963%7C3_620917948%7C11_1388976090%7C1000_1388967977&_=1388976091937

https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?callback=jQuery18308660551080269895_1388975862078&r=1388976119062&sid=e75TXbI7TnKUevmI&uin=750366800&deviceid=e519062714508114&synckey=1_620916854%7C2_620917963%7C3_620917948%7C11_1388976090%7C1000_1388967977&_=1388976119078

https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?callback=jQuery18308660551080269895_1388975862078&r=1388976173375&sid=e75TXbI7TnKUevmI&uin=750366800&deviceid=e519062714508114&synckey=1_620916854%7C2_620917963%7C3_620917948%7C11_1388976090%7C1000_1388967977&_=1388976173390

https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?callback=jQuery18308660551080269895_1388975862078&r=1388976146265&sid=e75TXbI7TnKUevmI&uin=750366800&deviceid=e519062714508114&synckey=1_620916854%7C2_620917963%7C3_620917948%7C11_1388976090%7C1000_1388967977&_=1388976146265

正常返回结果

window.synccheck={retcode:"0",selector:"0"}

有消息返回结果

window.synccheck={retcode:"0",selector:"6"}

发送消息返回结果

window.synccheck={retcode:"0",selector:"2"}

朋友圈有动态

window.synccheck={retcode:"0",selector:"4"}

获取消息-post-设置Cookie

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxsync?sid=e75TXbI7TnKUevmI&r=1388977398062

{"BaseRequest":{"Uin":750366800,"Sid":"e75TXbI7TnKUevmI"},"SyncKey":{"Count":5,"List":[{"Key":1,"Val":620916854},{"Key":2,"Val":620917978},{"Key":3,"Val":620917975},{"Key":201,"Val":1388977392},{"Key":1000,"Val":1388967977}]},"rr":1388977398062}

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxsync?sid=e75TXbI7TnKUevmI&r=1388977583250

{"BaseRequest":{"Uin":750366800,"Sid":"e75TXbI7TnKUevmI"},"SyncKey":{"Count":5,"List":[{"Key":1,"Val":620916854},{"Key":2,"Val":620917980},{"Key":3,"Val":620917975},{"Key":201,"Val":1388977400},{"Key":1000,"Val":1388967977}]},"rr":1388977583250}

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxsync?sid=e75TXbI7TnKUevmI&r=1388977660750

{"BaseRequest":{"Uin":750366800,"Sid":"e75TXbI7TnKUevmI"},"SyncKey":{"Count":5,"List":[{"Key":1,"Val":620916854},{"Key":2,"Val":620917982},{"Key":3,"Val":620917975},{"Key":201,"Val":1388977585},{"Key":1000,"Val":1388967977}]},"rr":1388977660750}

post 发送消息

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxsendmsg?sid=e75TXbI7TnKUevmI&r=1388977830140

{"BaseRequest":{"Uin":750366800,"Sid":"e75TXbI7TnKUevmI","Skey":"D6EBA5FA425CAE258F24E75CF51F2E1B4EEA9C5338BE456C","DeviceID":"e519062714508114"},"Msg":{"FromUserName":"langyeie","ToUserName":"pp80000","Type":1,"Content":"55","ClientMsgId":1388977830140,"LocalID":1388977830140}}

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxsync?sid=e75TXbI7TnKUevmI&r=1388977830390

{"BaseRequest":{"Uin":750366800,"Sid":"e75TXbI7TnKUevmI"},"SyncKey":{"Count":5,"List":[{"Key":1,"Val":620916854},{"Key":2,"Val":620917986},{"Key":3,"Val":620917975},{"Key":201,"Val":1388977776},{"Key":1000,"Val":1388967977}]},"rr":1388977830390}

get 有消息来,响铃

https://res.wx.qq.com/zh_CN/htmledition/swf/msg17ced3.mp3

获取消息中的图片

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxgetmsgimg?type=slave&MsgID={MsgID值}&skey=%40{skey值}

获取视频

/cgi-bin/mmwebwx-bin/webwxgetvideo?type=flv&msgid={MsgID值}&skey={SKey值}

/cgi-bin/mmwebwx-bin/webwxgetvideo?fun=download&msgid={MsgID值}&skey={SKey值}

获取语音

webwxgetvoice

@import url(http://www.cppblog.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);
posted on 2017-05-09 13:14 聂文龙 阅读(3672) 评论(1)  编辑 收藏 引用

FeedBack:
# re: 微信web版 协议 2017-05-09 14:17 聂文龙
获取uuid

https://login.weixin.qq.com/jslogin?appid=wx782c26e4c19acffb&redirect_uri=https%3A%2F%2Fwx.qq.com%2Fcgi-bin%2Fmmwebwx-bin%

2Fwebwxnewloginpage&fun=new&lang=zh_CN&_=1388994062250




获取二维码

https://login.weixin.qq.com/qrcode/+uuid+?t=webwx




等待扫描Get

https://login.weixin.qq.com/cgi-bin/mmwebwx-bin/login?uuid=454d958c7f6243&tip=1&_=1388975894359

https://login.weixin.qq.com/cgi-bin/mmwebwx-bin/login?uuid=454d958c7f6243&tip=1&_=1388975873359

https://login.weixin.qq.com/cgi-bin/mmwebwx-bin/login?uuid=454d958c7f6243&tip=1&_=1388975883859




扫描了-返回

window.code=201;

未扫描返回空




扫描之后-第一次请求成功

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxstatreport?type=1&r=1388975895453">https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxstatreport?type=1&r=1388975895453




{"BaseRequest":{"Uin":0,"Sid":0},"Count":1,"List":[{"Type":1,"Text":"/cgi-bin/mmwebwx-bin/login, First Request Success, uuid:

454d958c7f6243"}]}




扫描之后-第二次请求开始

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxstatreport?type=1&r=1388975895453">https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxstatreport?type=1&r=1388975895453




{"BaseRequest":{"Uin":0,"Sid":0},"Count":1,"List":[{"Type":1,"Text":"/cgi-bin/mmwebwx-bin/login, Second Request Start, uuid:

454d958c7f6243"}]}




等待确认Get

https://login.weixin.qq.com/cgi-bin/mmwebwx-bin/login?uuid=454d958c7f6243&tip=0&_=1388975895453

https://login.weixin.qq.com/cgi-bin/mmwebwx-bin/login?uuid=454d958c7f6243&tip=0&_=1388975900953

https://login.weixin.qq.com/cgi-bin/mmwebwx-bin/login?uuid=454d958c7f6243&tip=0&_=1388975906453

https://login.weixin.qq.com/cgi-bin/mmwebwx-bin/login?uuid=454d958c7f6243&tip=0&_=1388975911953




手机确认-返回

window.code=200;

window.redirect_uri="https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxnewloginpage?">https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxnewloginpage?

ticket=03f725a8039d418ab79c69b6ffbd771b&lang=zh_CN&scan=1388975896";

未确认返回空




get 登陆获取Cookie

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxnewloginpage?">https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxnewloginpage?

ticket=03f725a8039d418ab79c69b6ffbd771b&lang=zh_CN&scan=1388975896&fun=new

--设置Cookie 返回一个状态




post 第二次请求成功

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxstatreport?type=1&r=1388976086218




{"BaseRequest":{"Uin":0,"Sid":0},"Count":1,"List":[{"Type":1,"Text":"/cgi-bin/mmwebwx-bin/login, Second Request Success,

uuid: 454d958c7f6243, time: 190765ms"}]}




post 表示登陆成功-返回重要的数据key123

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxinit?r=1388976086484




{"BaseRequest":{"Uin":"750366800","Sid":"e75TXbI7TnKUevmI","Skey":"","DeviceID":"e519062714508114"}}




post 可能是获取列表

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxsync?sid=e75TXbI7TnKUevmI&r=1388976086734




{"BaseRequest":{"Uin":750366800,"Sid":"e75TXbI7TnKUevmI"},"SyncKey":{"Count":4,"List":[{"Key":1,"Val":620916854},

{"Key":2,"Val":620917961},{"Key":3,"Val":620917948},{"Key":1000,"Val":1388967977}]},"rr":1388976086734}

--这里的内容在上一步返回结果里




post 可能是获取当前会话列表-大数据

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxgetcontact?r=1388976086734




{}




post 可能是在手机上显示的提示信息

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxstatusnotify?r=1388976086750




{"BaseRequest":

{"Uin":750366800,"Sid":"e75TXbI7TnKUevmI","Skey":"","DeviceID":"e519062714508114"},"Code":3,"FromUserName":"langyeie","ToUser

Name":"langyeie","ClientMsgId":"1388976086750"}




get 获取头像图片

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxgeticon?seq=1388335457&username=langyeie




get 同理可以获取其他微信好友的头像

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxgeticon?seq=620917759&username=wxid_xx3mtgeux5511




post 更改什么状态?标记已读?

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxbatchgetcontact?type=ex&r=1388976086812




{"BaseRequest":{"Uin":750366800,"Sid":"e75TXbI7TnKUevmI","Skey":"","DeviceID":"e519062714508114"},"Count":10,"List":

[{"UserName":"z_zer0v","ChatRoomId":3445229833},{"UserName":"huobao002","ChatRoomId":3445229833},

{"UserName":"wxid_jo4qxoep4go411","ChatRoomId":3445229833},{"UserName":"jijunlong123456","ChatRoomId":3445229833},

{"UserName":"wxid_toyaj4qwrynb21","ChatRoomId":3445229833},{"UserName":"wxid_6655286553012","ChatRoomId":3445229833},

{"UserName":"wxid_rankrke1kkyd12","ChatRoomId":3445229833},{"UserName":"wxid_chcblpm846k022","ChatRoomId":3445229833},

{"UserName":"tw297554396","ChatRoomId":3445229833},{"UserName":"wxid_3076050756212","ChatRoomId":3445229833}]}




get headimg ?头像?

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxgetheadimg?seq=620917806&username=3445229833@chatroom










get 监听会话

https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?">https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?">https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?">https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?">https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?">https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?">https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?">https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?

callback=jQuery18308660551080269895_1388975862078&r=1388976091937&sid=e75TXbI7TnKUevmI&uin=750366800&deviceid=e51906271450811

4&synckey=1_620916854%7C2_620917963%7C3_620917948%7C201_1388976090%7C1000_1388967977&_=1388976091937




https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?">https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?">https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?">https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?">https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?">https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?">https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?">https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?

callback=jQuery18308660551080269895_1388975862078&r=1388976119062&sid=e75TXbI7TnKUevmI&uin=750366800&deviceid=e51906271450811

4&synckey=1_620916854%7C2_620917963%7C3_620917948%7C201_1388976090%7C1000_1388967977&_=1388976119078




https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?">https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?">https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?">https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?">https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?">https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?">https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?">https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?

callback=jQuery18308660551080269895_1388975862078&r=1388976173375&sid=e75TXbI7TnKUevmI&uin=750366800&deviceid=e51906271450811

4&synckey=1_620916854%7C2_620917963%7C3_620917948%7C201_1388976090%7C1000_1388967977&_=1388976173390




https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?">https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?">https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?">https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?">https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?">https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?">https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?">https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?

callback=jQuery18308660551080269895_1388975862078&r=1388976146265&sid=e75TXbI7TnKUevmI&uin=750366800&deviceid=e51906271450811

4&synckey=1_620916854%7C2_620917963%7C3_620917948%7C201_1388976090%7C1000_1388967977&_=1388976146265

正常返回结果

window.synccheck={retcode:"0",selector:"0"}

有消息返回结果

window.synccheck={retcode:"0",selector:"6"}

发送消息返回结果

window.synccheck={retcode:"0",selector:"2"}

朋友圈有动态

window.synccheck={retcode:"0",selector:"4"}







获取消息-post-设置Cookie

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxsync?sid=e75TXbI7TnKUevmI&r=1388977398062




{"BaseRequest":{"Uin":750366800,"Sid":"e75TXbI7TnKUevmI"},"SyncKey":{"Count":5,"List":[{"Key":1,"Val":620916854},

{"Key":2,"Val":620917978},{"Key":3,"Val":620917975},{"Key":201,"Val":1388977392},

{"Key":1000,"Val":1388967977}]},"rr":1388977398062}




https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxsync?sid=e75TXbI7TnKUevmI&r=1388977583250




{"BaseRequest":{"Uin":750366800,"Sid":"e75TXbI7TnKUevmI"},"SyncKey":{"Count":5,"List":[{"Key":1,"Val":620916854},

{"Key":2,"Val":620917980},{"Key":3,"Val":620917975},{"Key":201,"Val":1388977400},

{"Key":1000,"Val":1388967977}]},"rr":1388977583250}




https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxsync?sid=e75TXbI7TnKUevmI&r=1388977660750




{"BaseRequest":{"Uin":750366800,"Sid":"e75TXbI7TnKUevmI"},"SyncKey":{"Count":5,"List":[{"Key":1,"Val":620916854},

{"Key":2,"Val":620917982},{"Key":3,"Val":620917975},{"Key":201,"Val":1388977585},

{"Key":1000,"Val":1388967977}]},"rr":1388977660750}







post 发送消息

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxsendmsg?sid=e75TXbI7TnKUevmI&r=1388977830140




{"BaseRequest":

{"Uin":750366800,"Sid":"e75TXbI7TnKUevmI","Skey":"D6EBA5FA425CAE258F24E75CF51F2E1B4EEA9C5338BE456C","DeviceID":"e519062714508

114"},"Msg":

{"FromUserName":"langyeie","ToUserName":"pp80000","Type":1,"Content":"55","ClientMsgId":1388977830140,"LocalID":1388977830140

}}




https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxsync?sid=e75TXbI7TnKUevmI&r=1388977830390




{"BaseRequest":{"Uin":750366800,"Sid":"e75TXbI7TnKUevmI"},"SyncKey":{"Count":5,"List":[{"Key":1,"Val":620916854},

{"Key":2,"Val":620917986},{"Key":3,"Val":620917975},{"Key":201,"Val":1388977776},

{"Key":1000,"Val":1388967977}]},"rr":1388977830390}


get 有消息来,响铃
来自千明论坛 http://www.3d56.net/  回复  更多评论
  

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   博问   Chat2DB   管理