jixunmoe / jjbot Goto Github PK
View Code? Open in Web Editor NEWJust another Javascript Bot for webqq (not maintained anymore)
License: MIT License
Just another Javascript Bot for webqq (not maintained anymore)
License: MIT License
没进行详细测试,因此准备募集10w 只猴子 志愿者帮忙。
具体测试方法:
vm/init.js
内容,参见附录 (也有可能不用改?)。tx-vm.js
文件填入自己的登录信息,以及手动抓取一次 ptui_checkVC
的返回内容 (参见附录)。node tx-vm.js
,将输出的地址放入浏览器,如果成功,会显示 登陆成功
这样的文字。ptuiCB('0','0','http://ptlogin4.web2.qq.com/check_sig?pttype=1&uin=<qq>&service=login&nodirect=0&ptsigx=<隐藏>&s_url=http%3A%2F%2Fw.qq.com%2Fproxy.html%3Flogin2qq%3D1%26webqq_type%3D10&f_url=&ptlang=2052&ptredirect=100&aid=501004106&daid=164&j_later=0&low_login_hour=0®master=0&pt_login_type=1&pt_aid=0&pt_aaid=0&pt_light=0','0','登录成功!', '<昵称>');
答:暑假,或有时间的志愿者提交 PR。
vm/init.js
访问下面这个地址,然后从 <script>//错误上报
后面的内容一直复制到 </script><title>weblogin
之前。
https://ui.ptlogin2.qq.com/cgi-bin/login?daid=164&target=self&style=16&mibao_css=m_webqq&appid=501004106&enable_qlogin=0&no_verifyimg=1&s_url=http%3A%2F%2Fw.qq.com%2Fproxy.html&f_url=loginerroralert&strong_login=1&login_state=10&t=20131024001
vm/mq_comm.js
https://ui.ptlogin2.qq.com/js/10124/mq_comm.js
其中, 10124 是 js 版本。
ptui_checkVC
https://ssl.ptlogin2.qq.com/check?pt_tea=1&uin=<QQ号>&appid=501004106&js_ver=10124&js_type=0&login_sig=&u1=http%3A%2F%2Fw.qq.com%2Fproxy.html&r=
返回内容类似这样:
ptui_checkVC('0','!RC2','\x00\x00\x00\x00\xaa\xcc\xbb\xcc','<一堆十六进制文字>','0');
测试的是成功率,以及 vm\init.js
和 vm\mq_comm.js
的时效。
请务必将测试结果直接回复,感谢您的配合
你好,
在使用机器人时,有时只发了一条信息,就被T下线。在shell中显示:
[4:8:18][ERR ]: 机器人被T下线; 如果您是开发者请启用 --offline 进入离线模式调试避免占线。
tx的检测算法是如何检测出来的呢,他怎么得知这个账号是在使用机器人?有什么好的方法可以避免被T么?
谢谢!
edit : 每次被T下线后就被封号。用高等级的号能解决问题么?还是要注册会员 ? : /
经检查问题出在Bot.Looper.js
cleanup: function (bForce) {
if (bForce || this.status == 2) {
// 已经用过的数据就清掉。Check vfcode...
this.data.splice(0, this.index);
↑03.parse-cmd.js返回false后,Looper删掉了注册的msg事件
但是注释掉这行的话,会在机器人的第二条回复(无论第一条、第二条是不是解析指令产生的)报下面的错,不注释掉没问题
错误出在读取msg对象时,本来应该是msg的变量成了undefined
TypeError: Cannot read property 'isGroup' of undefined
at Object.CoreBot._sendMsg (D:\fakepath\jjBot\core.d\Bot.Core.js:515:20)
at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)
此外,无论这行是否存在,使用jj/money指令的时候会报一个出错原因完全一样的错,怀疑是同一个地方的问题导致的
TypeError: Cannot read property 'nick' of undefined
at D:\fakepath\jjBot\plug.d\uc.d\money.js:9:45
at Object.<anonymous> (D:\fakepath\jjBot\core.d\Bot.Plugin.js:298:29)
at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)
(不要吐槽fakepath那里原本是堆乱码
undefined:5
((__t=( hitokoto ))==null?'':__t)+
^
ReferenceError: hitokoto is not defined
at Object.eval (eval at (/root/jjbot/node_modules/underscore/underscore.js:1329:20), :5:9)
at Object.template (/root/jjbot/node_modules/underscore/underscore.js:1336:21)
at /root/jjbot/plug.d/50.hitokoto.js:83:18
at IncomingMessage. (/root/jjbot/plug.d/50.hitokoto.js:42:4)
at IncomingMessage.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:920:16
at process._tickCallback (node.js:415:13)
[20:57:23][INFO]: Login: 您输入的验证码不正确,请重新输入。
[20:57:23][ERR ]: Login failed! Debug: { '0': 4,
'1': 0,
'2': '',
'3': 0,
'4': '您输入的验证码不正确,请重新输入。',
'5': '2957076820' }
events.js:72
throw er; // Unhandled 'error' event
^
Error: The 'InnoDB' feature is disabled; you need MySQL built with 'InnoDB' to h
ave it working
at Packet.asError (E:\jjbot\node_modules\mysql2\lib\packets\packet.js:487:13
)
at Query.Command.execute (E:\jjbot\node_modules\mysql2\lib\commands\command.
js:17:22)
at Connection.handlePacket (E:\jjbot\node_modules\mysql2\lib\connection.js:2
63:28)
at PacketParser.onPacket (E:\jjbot\node_modules\mysql2\lib\connection.js:68:
65)
at PacketParser.execute (E:\jjbot\node_modules\mysql2\lib\packet_parser.js:4
0:21)
at Socket.<anonymous> (E:\jjbot\node_modules\mysql2\lib\connection.js:80:31)
at Socket.EventEmitter.emit (events.js:95:17)
at Socket.<anonymous> (_stream_readable.js:746:14)
at Socket.EventEmitter.emit (events.js:92:17)
at emitReadable_ (_stream_readable.js:408:10)
[16:0:23][MSG ]: 绅士仓库 -> Mr丶Linc : -> jj/time
[16:0:23][WARN]: User not found for uin: 4048820363
TypeError: Object Mon Jan 12 2015 16:00:23 GMT+0800 (涓浗鏍囧噯鏃堕棿) has no
method 'toLocaleFormat'
at C:\fakepath\jjbot\plug.d\50.time.js:12:44
at Object.<anonymous> (C:\fakepath\jjbot\core.d\Bot.Plugin.js:317:2
9)
at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)
子进程已经退出...
以下是所有的输出信息:
$ node Boot.js
Loading modules...
Loading module: log
[20:57:49][INFO]: Loading module: db
[20:57:49][INFO]: Loading module: queue
[20:57:49][INFO]: Loading module: cache
[20:57:49][INFO]: Loading module: web
[20:57:49][WEB ]: Web Server launched at port: 2333
[20:57:49][INFO]: Loading module: boot
[20:57:49][INFO]: Project jjBot Boot :: Fri Aug 01 2014 20:57:49 GMT+0800 (**
标准时间)
[20:57:49][INFO]: __ROOT__ : C:\Users\Zebin\Desktop\jjBot/
[20:57:49][INFO]: Fix debug info
[20:57:49][INFO]: >> Fiddler hook
[20:57:49][INFO]: Check vfcode...
[20:57:49][INFO]: Loading plugin 00.parse-cmd.js ...
[20:57:49][INFO]: Plugin 00.parse-cmd.js : 指令解析器! 1.0
[20:57:49][INFO]: Loading plugin 03.emu-msg-eve.js ...
[20:57:49][INFO]: Plugin 03.emu-msg-eve.js : 模擬訊息事件 1.0
[20:57:49][INFO]: Loading plugin 07.uc.js ...
[20:57:49][INFO]: Init. database ...
[20:57:49][INFO]: Plugin 07.uc.js : 用户中心! 1.0
[20:57:49][INFO]: Loading plugin 10.uptime.js ...
[20:57:49][INFO]: Plugin 10.uptime.js : Uptime 1.0
[20:57:49][INFO]: Loading plugin 50.emoji.js ...
[20:57:49][INFO]: Plugin 50.emoji.js : 颜文字表情包 1.0
[20:57:49][INFO]: Loading plugin 50.ping.js ...
[20:57:49][INFO]: Plugin 50.ping.js : Ping! 1.0
[20:57:49][INFO]: Loading plugin 50.prpr.js ...
[20:57:49][INFO]: Plugin 50.prpr.js : 舔一舔 1.0
[20:57:49][INFO]: Loading plugin 50.repeator.js ...
[20:57:49][INFO]: Plugin 50.repeator.js : 復讀姬 1.0.1
[20:57:49][INFO]: Loading plugin 50.time.js ...
[20:57:49][INFO]: Plugin 50.time.js : 报时 1.0
[20:57:49][INFO]: Loading plugin 98.test.js ...
[20:57:49][INFO]: Plugin 98.test.js : 图片分享 1.0
[20:57:49][INFO]: Loading plugin 99.plug-manager.js ...
[20:57:49][INFO]: Plugin 99.plug-manager.js : 插件管理员 1.0
C:\Users\Zebin\Desktop\jjBot\core.d\Bot.Auth.js:89
if (3 != json.length) throw new Error ('Unable to fetch VFCODE s
tatus: ' + b
^
Error: Unable to fetch VFCODE status: ptui_checkVC('0','!UQI','\x00\x00\x00\x00\
x11\x5a\xbd\xb8', '55ba12cf898289db037b327b4fe7ff43ebeb2365d54338de25cc54b25115a
f38500e2cb7d74c58d668faa51eef682d33');
at C:\Users\Zebin\Desktop\jjBot\core.d\Bot.Auth.js:89:31
at IncomingMessage.<anonymous> (C:\Users\Zebin\Desktop\jjBot\core.d\Bot.Auth
.js:28:4)
at IncomingMessage.emit (events.js:117:20)
at _stream_readable.js:929:16
at process._tickCallback (node.js:419:13)
集训桑,我在windows运行jjbot的时候,出现了以上的提示信息,在查看了SAQ和HELP没有找到解决办法,
于是来打扰你了,主要的问题有:
出现这样的错误提示,集训桑是否知道原因和相应的解决办法?出现错误的Bot.Auth.js文件里面的代码是用来实现身份认证的吗?如果不是又是做什么的呢?我在执行“npm install”安装相应依赖项的时候,出现了警告,当时并没有太在意,会不会是因为这个QAQ
第一次给别人提交issue,有不周全的地方请见谅...百忙之中打扰你,请见谅。
[20:38:1][WARN]: Fiddler is not up, http.request not patched.
[20:38:1][INFO]: vf-status: [ '1', '', '\x00\x00\x00\x00\x16\xed\x66\x67', '' ]
[20:38:1][INFO]: Need varify code, downloading image...
[20:38:1][INFO]: Request login_sig ...
[20:38:2][INFO]: vfCode downloaded, open your browser and type it.
/root/bot/jjBot/core.d/Bot.Auth.js:180
var newSig = data.match (/g_login_sig.*?"(.+?)"/)[1];
^
TypeError: Cannot read property '1' of null
at /root/bot/jjBot/core.d/Bot.Auth.js:180:53
at IncomingMessage. (/root/bot/jjBot/core.d/Bot.Auth.js:28:4)
at IncomingMessage.emit (events.js:117:20)
at _stream_readable.js:938:16
at process._tickCallback (node.js:419:13)
待修
待修
[11:49:2][MSG ]: Send G: xx (uin) [A] 签到成功! 获得 45 喵币 { retcode: 0, result: 'ok' }
[11:49:2][MSG ]: Send G: xx (uin) [A] 签到成功! 获得 32 喵币 { retcode: 0, result: 'ok' }
目前如果网络不够快的话很容易造成这种卡签的效果,以后可以用 queue 模组减低这种卡签。
Bot.sendMsg (true, gid, $_POST.msg);
应该为
Bot.sendMsg ({isGroup: true}, gid, $_POST.msg);
你好,
jjBOT很好用。这两天我在试着编写 jjBOT 的plugin。请问,如何在plugin中得到QQ群中发信息者的QQ号码?
msg.user 数组只有 { nick: '',
province: '',
gender: 'unknown',
uin:,
country: '',
city: '',
profileName: '' },
而没有记录号码这一项。
谢谢!
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.