moontide / wechatbotengine Goto Github PK
View Code? Open in Web Editor NEW基于微信网页版 HTTP 协议的机器人引擎(含一些机器人)。WeChat bot engine based on WeChat HTTP protocol of WeChat Web Edition, several bots included.
基于微信网页版 HTTP 协议的机器人引擎(含一些机器人)。WeChat bot engine based on WeChat HTTP protocol of WeChat Web Edition, several bots included.
2017-06-01 19:42:19.992 [警告] net_maclife_wechat_http_BotApp ProcessBaseResponse: WebWeChatInit 失败,代码: 1100
全是红字咋搞呀
WeChatBotEngine 每次登录,12 小时后此会话必定过期,导致要重新登录一次。而微信网页版不会出现这个问题。
我使用自己下载的包,出了了一些问题。
缓存的 session 信息在 synccheck 的时候不起作用。但在获取联系人、群联系人时没有问题。
2016-12-15 03:38:45.065 [信息] net_maclife_wechat_http_BotEngine LoadBot: 消息中继 机器人已创建并加载 2016-12-15 03:38:45.074 [信息] net_maclife_wechat_http_BotEngine LoadBot: Google 图片搜索 机器人已创建并加载 2016-12-15 03:38:45.075 [信息] net_maclife_wechat_http_BotEngine LoadBot: 百度翻译 机器人已创建并加载 2016-12-15 03:38:45.076 [信息] net_maclife_wechat_http_BotEngine LoadBot: 简易通讯录 机器人已创建并加载 2016-12-15 03:38:45.097 [信息] net_maclife_wechat_http_BotEngine run: 缓存的 Session 信息 UIN: ************ SID: ************* SKEY: @crypt_*************************************** TICKET: ****************************************************** EncryptedAccountInThisSession: @***************************************************** CustomAccount/Alias: NickName: **** SyncCheckKeys: {"Count":10,"List":[{"Key":1,"Val":":*************},{"},{"Key":2,"Val":":*************},{"},{"Key":3,"Val":":*************},{"},{"Key":11,"Val":":*************},{"},{"Key":13,"Val":":*************},{"},{"Key":201,"Val":":*************},{"},{"Key":1000,"Val":*************},{"K$ y":1001,"Val":":*************},{"},{"Key":1002,"Val":*************},{"Key":1003,"Val":":*************},{"}]} 2016-12-15 03:38:45.097 [信息] net_maclife_wechat_http_BotApp WebWeChatStatusNotify: 开启状态通知 … 2016-12-15 03:38:45.393 [信息] net_maclife_wechat_http_BotApp WebWeChatGetContacts: 获取联系人 … 2016-12-15 03:38:46.127 [信息] net_maclife_wechat_http_BotApp WebWeChatGetContacts: 共 N 个联系人 1. ****** (公众号) 2. gh_625508a143e8 (公众号, 订阅号) 3. 华硕智能手机 (公众号, 订阅号) 4. 微信团队 (公众号, 订阅号, 微信团队号) ………… 2016-12-15 03:38:46.129 [信息] net_maclife_wechat_http_BotApp WebWeChatGetRoomContacts: 获取 2 个聊天室的联系人 … 2016-12-15 03:38:46.529 [信息] net_maclife_wechat_http_BotApp WebWeChatGetRoomContacts: 共 N 个聊天室 1 ****** 1. ****** 2. ****** …… 2 ****** 1. ****** 2. ****** …… 2016-12-15 03:38:46.709 [警告] net_maclife_wechat_http_BotApp WebWeChatGetMessagePackage: WebWeChatGetMessagePackage 中 synccheck 返回 1102 -- 可能微信网页版(含 Windows 版)在其他地方登录了、或者 SyncCheckKey 参数不正确
特意给个赞!
有ipad或者pc协议么
/loglevel all 日志级别已改为: ALL 2016-12-21 16:13:19.938 [详细] net_maclife_wechat_http_BotApp WebWeChatGetMessagePackage: 等待并获取新消息 WebWeChatGetMessagePackage (synccheck & webwxsync) … 2016-12-21 16:13:19.938 [详细] net_maclife_wechat_http_BotApp WebWeChatGetMessagePackage: WebWeChatGetMessagePackage 中 synccheck 的 URL: 2016-12-21 16:13:19.938 [详细] net_maclife_wechat_http_BotApp WebWeChatGetMessagePackage: https://webpush.wx2.qq.com/cgi-bin/mmwebwx-bin/synccheck?r=1482307999938&skey=************************&sid=************************&uin=************************&deviceid=e454998449344482&synckey=1_666090009%7C2_666090254%7C3_666090009%7C11_666090181%7C13_666090009%7C201_1482306889%7C203_1482285989%7C1000_1482281821%7C1001_1482281851&_=1482307999938 2016-12-21 16:13:19.938 [较详细] net_maclife_wechat_http_BotApp WebWeChatGetMessagePackage: 发送 WebWeChatGetMessagePackage 中 synccheck 的 http 请求消息头 (Cookie): 2016-12-21 16:13:19.939 [较详细] net_maclife_wechat_http_BotApp WebWeChatGetMessagePackage: {Cookie=webwx_data_ticket=************************; webwx_auth_ticket=************************; webwxuvid=************************; mm_lang=en_US; wxloadtime=1482300740; wxsid=************************; wxuin=************************; } 2016-12-21 16:13:19.970 [详细] net_maclife_wechat_http_BotApp WebWeChatGetMessagePackage: 获取 WebWeChatGetMessagePackage 中 synccheck 的 http 响应消息体: 2016-12-21 16:13:19.970 [详细] net_maclife_wechat_http_BotApp WebWeChatGetMessagePackage: window.synccheck={retcode:"0",selector:"7"} 2016-12-21 16:13:19.971 [详细] net_maclife_wechat_http_BotApp WebWeChatGetMessagePackage: WebWeChatGetMessagePackage 中 synccheck 返回 selector 7 -- 进入/离开聊天页面? 2016-12-21 16:13:21.971 [详细] net_maclife_wechat_http_BotApp WebWeChatGetMessagePackage: 等待并获取新消息 WebWeChatGetMessagePackage (synccheck & webwxsync) … 2016-12-21 16:13:21.971 [详细] net_maclife_wechat_http_BotApp WebWeChatGetMessagePackage: WebWeChatGetMessagePackage 中 synccheck 的 URL: 2016-12-21 16:13:21.972 [详细] net_maclife_wechat_http_BotApp WebWeChatGetMessagePackage: https://webpush.wx2.qq.com/cgi-bin/mmwebwx-bin/synccheck?r=1482308001971&skey=************************&sid=************************&uin=************************&deviceid=e547912204031966&synckey=1_666090009%7C2_666090254%7C3_666090009%7C11_666090181%7C13_666090009%7C201_1482306889%7C203_1482285989%7C1000_1482281821%7C1001_1482281851&_=1482308001971 2016-12-21 16:13:21.972 [较详细] net_maclife_wechat_http_BotApp WebWeChatGetMessagePackage: 发送 WebWeChatGetMessagePackage 中 synccheck 的 http 请求消息头 (Cookie): 2016-12-21 16:13:21.972 [较详细] net_maclife_wechat_http_BotApp WebWeChatGetMessagePackage: {Cookie=webwx_data_ticket=************************; webwx_auth_ticket=************************; webwxuvid=************************; mm_lang=en_US; wxloadtime=1482300740; wxsid=************************; wxuin=************************; } 2016-12-21 16:13:22.004 [详细] net_maclife_wechat_http_BotApp WebWeChatGetMessagePackage: 获取 WebWeChatGetMessagePackage 中 synccheck 的 http 响应消息体: 2016-12-21 16:13:22.004 [详细] net_maclife_wechat_http_BotApp WebWeChatGetMessagePackage: window.synccheck={retcode:"0",selector:"7"} 2016-12-21 16:13:22.004 [详细] net_maclife_wechat_http_BotApp WebWeChatGetMessagePackage: WebWeChatGetMessagePackage 中 synccheck 返回 selector 7 -- 进入/离开聊天页面? ... ... ...
请问这个有交流群吗?为什么群消息无法获取到getUserRemarkName?
如题。
如日志所示,观察一下 Content 里的内容,是空的
2017-04-27 17:44:39.684 [信息] net_maclife_wechat_http_BotApp WebWeChatGetMessagePackage:
--------------------------------------------------
2017-04-27 17:44:39.685 [较详细] net_maclife_wechat_http_BotApp WebWeChatGetMessagePackage: 获取 WebWeChatGetMessagePackage 中 webwxsync 设置的新 Cookie (保持会话不过期可能就指望它了):
2017-04-27 17:44:39.686 [较详细] net_maclife_wechat_http_BotApp WebWeChatGetMessagePackage: [webwx_data_ticket=********************; Domain=.qq.com; Path=/; Expires=Thu, 27-Apr-2017 21:44:39 GMT, wxsid=**********; Domain=wx2.qq.com; Path=/; Expires=Thu, 27-Apr-2017 21:44:39 GMT, wxuin=**********; Domain=wx2.qq.com; Path=/; Expires=Sun, 30-Apr-2017 09:44:39 GMT, wxpluginkey=**********; Domain=wx2.qq.com; Path=/; Expires=Thu, 27-Apr-2017 21:44:39 GMT]
2017-04-27 17:44:39.686 [较详细] net_maclife_wechat_http_BotApp WebWeChatGetMessagePackage: 获取 WebWeChatGetMessagePackage 中 webwxsync 的 http 响应消息体:
2017-04-27 17:44:39.686 [较详细] net_maclife_wechat_http_BotApp WebWeChatGetMessagePackage: {"BaseResponse":{"Ret":0,"ErrMsg":""},"AddMsgCount":1,"AddMsgList":[{"MsgId":"********************","FromUserName":"@****************************************************************","ToUserName":"@@****************************************************************","MsgType":51,"Content":"","Status":3,"ImgStatus":1,"CreateTime":1493286279,"VoiceLength":0,"PlayLength":0,"FileName":"","FileSize":"","MediaId":"","Url":"","AppMsgType":0,"StatusNotifyCode":2,"StatusNotifyUserName":"@@****************************************************************","RecommendInfo":{"UserName":"","NickName":"","QQNum":0,"Province":"","City":"","Content":"","Signature":"","Alias":"","Scene":0,"VerifyFlag":0,"AttrStatus":0,"Sex":0,"Ticket":"","OpCode":0},"ForwardFlag":0,"AppInfo":{"AppID":"","Type":0},"HasProductId":0,"Ticket":"","ImgHeight":0,"ImgWidth":0,"SubMsgType":0,"NewMsgId":********************,"OriContent":""}],"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":10,"List":[{"Key":1,"Val":**********},{"Key":2,"Val":**********},{"Key":3,"Val":**********},{"Key":11,"Val":**********},{"Key":13,"Val":**********},{"Key":201,"Val":**********},{"Key":203,"Val":**********},{"Key":1000,"Val":**********},{"Key":1001,"Val":**********},{"Key":1004,"Val":**********}]},"SKey":"","SyncCheckKey":{"Count":10,"List":[{"Key":1,"Val":**********},{"Key":2,"Val":**********},{"Key":3,"Val":**********},{"Key":11,"Val":**********},{"Key":13,"Val":**********},{"Key":201,"Val":**********},{"Key":203,"Val":**********},{"Key":1000,"Val":**********},{"Key":1001,"Val":**********},{"Key":1004,"Val":**********}]}}
2017-04-27 17:44:39.815 [严重] net_maclife_wechat_http_BotEngine OnMessagePackageReceived: @**************************************************************** → @@****************************************************************
2017-04-27 17:44:39.815 [详细] net_maclife_wechat_http_BotEngine OnMessagePackageReceived: * 是自己发出的消息,现在改一下“回复给谁 / ReplyTo”
2017-04-27 17:44:39.816 [信息] net_maclife_wechat_http_BotEngine OnMessagePackageReceived: 收到类型=51, ID=******************** 的消息(自己在其他设备上发出的)
→ 【********】:
[Fatal Error] :1:1: 文件提前结束。
nu.xom.ParsingException: 文件提前结束。 at line 1, column 1
at nu.xom.Builder.build(Unknown Source)
at nu.xom.Builder.build(Unknown Source)
at nu.xom.Builder.build(Unknown Source)
at net_maclife_wechat_http_BotEngine.OnOperationMessageReceived(net_maclife_wechat_http_BotEngine.java:1756)
at net_maclife_wechat_http_BotEngine.OnMessagePackageReceived(net_maclife_wechat_http_BotEngine.java:1259)
at net_maclife_wechat_http_BotEngine.run(net_maclife_wechat_http_BotEngine.java:958)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; 文件提前结束。
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1239)
... 11 more
以前,Content 的内容会是类似下面格式的数据:
<msg>
<op id='2'>
<username>********@chatroom</username>
</op>
</msg>
username
节点的内容就是联系人的明文 ID -- 在不同的登录会话之间是不会变化的。
大概 40 天之前我在 Urinx/WeixinBot#138 (comment) 解答过,不知是否被腾讯员工看到,进而做了更改?
昨天碰到 webwxsync BaseResponse Ret 为代码 3 的问题,一直死循环,直到本次会话有效期截止(11:43:46 -- 13:39:38)。
原因未知,代码含义也未知。
2016-12-28 11:43:46.421 [信息] net_maclife_wechat_http_BotApp WebWeChatGetMessagePackage: -------------------------------------------------- 2016-12-28 11:43:46.421 [较详细] net_maclife_wechat_http_BotApp WebWeChatGetMessagePackage: 获取 WebWeChatGetMessagePackage 中 webwxsync 的 http 响应消息体: 2016-12-28 11:43:46.422 [较详细] net_maclife_wechat_http_BotApp WebWeChatGetMessagePackage: {"BaseResponse":{"Ret":3,"ErrMsg":""},"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":"","SyncCheckKey":{"Count":0,"List":[]}} 2016-12-28 11:43:46.422 [警告] net_maclife_wechat_http_BotApp ProcessBaseResponse: WebWeChatGetMessagePackage 中 webwxsync 失败,代码: 3 , 错误信息:
2017-10-02 11:36 机器人后台被微信服务器踢出,再次重新登录时报以下错误:
<error><ret>1203</ret><message>当前登录环境异常。为了你的帐号安全,暂时不能登录web微信。你可以通过手机客户端或 windows微信登录。</message></error>
联想到有网友登录其他微信机器人也遭到网页版被禁止登录的消息,确定自己的微信号也被封了(仅仅针对网页版)。
在写一个测试类ClassA时,随便把A放到了顶级包层次,也就是没有包声明,结果发现其他包下的类是无法引用到这个类的,只有另建一个同样的顶级类ClassB,才能正常引用。
建议还是按正常的结构目录,否则,不易于使用也不易于更广泛的使用。
只有sh运行,netbeans打不开项目
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.