问题描述
需求:要求可以自动给微信上的还有消息。好友收到消息之后,有声音提醒。注意:微信公众平台发送的消息,没有声音提醒了。1,微信网页版大致原理,客户端网页包含一个定时变化的uuid,不停的请求服务器验证。手机版登录之后,扫描这个二维码得到客户端的uuid,并将已经登录的微信一起传输给服务器,客户端收到此uuid的登录信息之后,自动跳转。2,StartBlueStacks模拟器,这个安装麻烦,可以登录微信并且发送消息。C#程序如果调用这个,目前还不会。winapi?3,反编译微信,中间劫持。这个也有难度。4,webbrowse登录之后,发送消息等,无网页跳转。5,手机微信协议tcp6,微信证书,SSL,https-------------我用网页版抓包之后,通过模拟请求,总是提示超时,是由于没有带证书吗?网页抓包(无返回值)https://login.weixin.qq.com/cgi-bin/mmwebwx-bin/login?uuid=C5NedcoZvqaoP5&tip=1&_=1364957205494手机二维码扫描(1个地址)https://login.weixin.qq.com/l/C5NedcoZvqaoP5手机扫一扫(微信登录后扫描)我确认登录网页微信网页版//1GETurl:https://login.weixin.qq.com/cgi-bin/mmwebwx-bin/login?uuid=C6oHR2kIHSJtzN&tip=0&_=1364957619490data:content:window.code=200;window.redirect_uri="https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxnewloginpage?ticket=9f169e06-5746-1031-80b8-50e54929056d&lang=zh_CN&scan=1364957539";//2GETurl:https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxnewloginpage?ticket=9f169e06-5746-1031-80b8-50e54929056d&lang=zh_CN&scan=1364957539&fun=newdata:content:<error><ret>0</ret><message>OK</message></error>//3POSTurl:https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxstatreport?type=1&r=1364957625472data:{"BaseRequest":{"Uin":0,"Sid":0},"Count":1,"List":[{"Type":1,"Text":"/cgi-bin/mmwebwx-bin/login,SecondRequestSuccess,uuid:C6oHR2kIHSJtzN,time:88913ms"}]}conten://4POSTurl:https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxinit?r=1364957626023data:{"BaseRequest":{"Uin":"2495840862","Sid":"L8ENNXoJXoLDlLK7","Skey":"","DeviceID":"e055515844817185"}}content:{"BaseResponse":{"Ret":0,"ErrMsg":""},"Count":2,"ContactList":[{"Uin":99001,"UserName":"filehelper","NickName":"鏂囦欢浼犺緭鍔墜","HeadImgUrl":"/cgi-bin/mmwebwx-bin/webwxgeticon?seq=0&username=filehelper","ContactFlag":0,"MemberCount":0,"MemberList":[],"RemarkName":"","HideInputBarFlag":0,"Sex":0,"Signature":"","VerifyFlag":0,"OwnerUin":0,"PYInitial":"WJCSZS","PYQuanPin":"wenjianchuanshuzhushou","RemarkPYInitial":"","RemarkPYQuanPin":"","StarFriend":0,"AppAccountFlag":0,"Statues":0,"AttrStatus":0,"Province":"","City":"","Alias":"","SnsFlag":0,"UniFriend":0},{"Uin":100005,"UserName":"weixin","NickName":"寰俊鍥㈤槦","HeadImgUrl":"/cgi-bin/mmwebwx-bin/webwxgeticon?seq=940002&username=weixin","ContactFlag":1,"MemberCount":0,"MemberList":[],"RemarkName":"","HideInputBarFlag":0,"Sex":0,"Signature":"","VerifyFlag":0,"OwnerUin":0,"PYInitial":"WXTD","PYQuanPin":"weixintuandui","RemarkPYInitial":"","RemarkPYQuanPin":"","StarFriend":0,"AppAccountFlag":0,"Statues":0,"AttrStatus":0,"Province":"","City":"","Alias":"","SnsFlag":0,"UniFriend":0}],"SyncKey":{"Count":4,"List":[{"Key":1,"Val":940169},{"Key":2,"Val":940170},{"Key":3,"Val":940166},{"Key":1000,"Val":1364903854}]},"User":{"Uin":2495840862,"UserName":"wxid_dmo5eag0hz3h22","NickName":"绉︽捣鍐?,"HeadImgUrl":"/cgi-bin/mmwebwx-bin/webwxgeticon?seq=1365070516&username=wxid_dmo5eag0hz3h22","RemarkName":"","PYInitial":"","PYQuanPin":"","RemarkPYInitial":"","RemarkPYQuanPin":"","HideInputBarFlag":0,"StarFriend":0,"Sex":1,"Signature":"鍗庝箰灞卞簞","AppAccountFlag":0,"VerifyFlag":0,"ContactFlag":0,"WebWxPluginSwitch":0,"HeadImgFlag":1,"SnsFlag":16},"ChatSet":"filehelper,weixin,","SKey":"DC63528EF312BA7B800F217CB29AD80AB40E9F7B5B3E231D","ClientVersion":604307714}你已经在浏览器登录微信网页版发送消息:{"BaseRequest":{"Uin":2495840862,"Sid":"L8ENNXoJXoLDlLK7","Skey":"C820E8C82FCFFFA7237F0554843B42DDCB03346412FCAA45","DeviceID":"e055515844817185"},"Msg":{"FromUserName":"wxid_dmo5eag0hz3h22","ToUserName":"wxid_adbehu4p5jjd21","Type":1,"Content":"娴嬭瘯銆俢eshi","ClientMsgId":1364959117142,"LocalID":1364959117142}}{"BaseResponse":{"Ret":0,"ErrMsg":""},"MsgID":940185,"LocalID":"1364959117142"}验证是否掉线:https://webpush.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck?callback=jQuery18309088877395601009_1364957395354&sid=L8ENNXoJXoLDlLK7&uin=2495840862&deviceid=e055515844817185&synckey=1_940175%7C2_940183%7C3_940179%7C1000_1364903854&_=1364958842940window.synccheck={retcode:"0",selector:"0"}
解决方案
解决方案二:
ServicePointManager.SecurityProtocol=SecurityProtocolType.Ssl3;
可以过证书然后返回window.code=408;下面就需要抓包手机端如何允许网页版登陆,手机端扫码验证信息完成就可以返回window.code=200了,接下来拿到ticket后续操作POST里的UID在GET2返回的cookies里DeviceID为随机数
解决方案三:
解决方案四:
引用2楼squallleonheart的回复:
结贴了吗?我可以实现发消息哦。1000元哪..见我的博客http://blog.csdn.net/squallleonheart/article/details/11590933有意向请联系
钱已到账,请注意查收
解决方案五:
引用3楼mmm306306的回复:
Quote: 引用2楼squallleonheart的回复:
结贴了吗?我可以实现发消息哦。1000元哪..见我的博客http://blog.csdn.net/squallleonheart/article/details/11590933有意向请联系钱已到账,请注意查收
转发3楼500次
解决方案六:
引用4楼id270的回复:
Quote: 引用3楼mmm306306的回复:
Quote: 引用2楼squallleonheart的回复:
结贴了吗?我可以实现发消息哦。1000元哪..见我的博客http://blog.csdn.net/squallleonheart/article/details/11590933有意向请联系钱已到账,请注意查收
转发3楼500次
那我再加一次
解决方案七:
引用5楼nevermore_0923的回复:
Quote: 引用4楼id270的回复:
Quote: 引用3楼mmm306306的回复:
Quote: 引用2楼squallleonheart的回复:
结贴了吗?我可以实现发消息哦。1000元哪..见我的博客http://blog.csdn.net/squallleonheart/article/details/11590933有意向请联系钱已到账,请注意查收
转发3楼500次
那我再加一次
2L消失了
解决方案八:
引用3楼mmm306306的回复:
Quote: 引用2楼squallleonheart的回复:
结贴了吗?我可以实现发消息哦。1000元哪..见我的博客http://blog.csdn.net/squallleonheart/article/details/11590933有意向请联系钱已到账,请注意查收
谢谢。买家真是好人,不仅及时付款,而且还多付了一位数..3q问题是为什么我的楼层消失了?
解决方案九:
楼主求解惑,我获取到了好友列表,获取接收到的信息时总出错。,{"Uin":648315561,"UserName":"wxid_9513415132812","NickName":"蛮子文摘","HeadImgUrl":"/cgi-bin/mmwebwx-bin/webwxgeticon?seq=623320051&username=wxid_9513415132812","ContactFlag":3,"MemberCount":0,"MemberList":[],"RemarkName":"","HideInputBarFlag":0,"Sex":0,"Signature":"《蛮子文摘》,在上下班路上围观中国!","VerifyFlag":24,"OwnerUin":0,"PYInitial":"MZWZ","PYQuanPin":"manziwenzhai","RemarkPYInitial":"","RemarkPYQuanPin":"","StarFriend":0,"AppAccountFlag":0,"Statues":0,"AttrStatus":32,"Province":"北京","City":"朝阳","Alias":"MZWZ2012","SnsFlag":0,"UniFriend":0}],"SyncKey":{"Count":4,"List":[{"Key":1,"Val":623331213},{"Key":2,"Val":623331319},{"Key":3,"Val":623331213},{"Key":1000,"Val":1383192741}]},"User":{"Uin":2705051605,"UserName":"wxid_h35xcy8srwmv21","NickName":"雪狐","HeadImgUrl":"/cgi-bin/mmwebwx-bin/webwxgeticon?seq=1383573722&username=wxid_h35xcy8srwmv21","RemarkName":"","PYInitial":"","PYQuanPin":"","RemarkPYInitial":"","RemarkPYQuanPin":"","HideInputBarFlag":0,"StarFriend":0,"Sex":1,"Signature":"","AppAccountFlag":0,"VerifyFlag":0,"ContactFlag":0,"WebWxPluginSwitch":0,"HeadImgFlag":0,"SnsFlag":16},"ChatSet":"filehelper,gh_5ad56faf81b2,gh_88403321dba1,gh_233e8b694c05,gh_5930065db70d,zhongguozhisheng5538,gh_325a150dcec9,gh_53d2858339d8,newsapp,weixin,wxid_9513415132812,","SKey":"80A34FBC02DE9E223888D28ED45E543993024E5A96955F0A","ClientVersion":620757506,"SystemTime":1383211732}打印请求数据的Cookie:mm_lang=zh_CN;webwxuvid=2467701459;wxloadtime=1383211731;wxsid=mTIXLC1O+kaHB339;wxuin=2705051605;{"BaseResponse":{"Ret":1200,"ErrMsg":"jsonformaterror"},"AddMsgCount":0,"AddMsgList":[],"ModContactCount":0,"ModContactList":[],"DelContactCount":0,"DelContactList":[],"ModChatRoomMemberCount":0,"ModChatRoomMemberList":[],"Profile":{"BitFlag":0,"UserName":{"Buff":""},"NickName":{"Buff":""},"BindUin":0,"BindEmail":{"Buff":""},"BindMobile":{"Buff":""},"Status":0,"Sex":0,"PersonalCard":0,"Alias":"","HeadImgUpdateFlag":0,"HeadImgUrl":"","Signature":""},"ContinueFlag":0,"SyncKey":{"Count":0,"List":[]},"SKey":""}
解决方案十:
知道问题的大神们能否给个QQ交流一下。
解决方案十一:
楼主的问题解决了吗?
解决方案十二:
引用7楼squallleonheart的回复:
Quote: 引用3楼mmm306306的回复:
Quote: 引用2楼squallleonheart的回复:
结贴了吗?我可以实现发消息哦。1000元哪..见我的博客http://blog.csdn.net/squallleonheart/article/details/11590933有意向请联系钱已到账,请注意查收
谢谢。买家真是好人,不仅及时付款,而且还多付了一位数..3q问题是为什么我的楼层消失了?
2楼还在,大家快看