
Security News
NIST Under Federal Audit for NVD Processing Backlog and Delays
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
An IM Bot for NodeJs, base on bot.im API. Simple to create the AIM, Yahoo, Jabber, and MSN bot.
imbot是一个基于bot.im API的NodeJs模块,可以通过imbot来访问bot.im提供的API。 For detailed information about this, please visit the bot.im API documents: http://bot.im/developers/api. 如果想获得详细的关于imbot的信息,请浏览bot.im官方API文档:http://bot.im/developers/api。
npm install imbot
var imbot = require('imbot');
// 监听80端口
var waiter = imbot.createBot({
port: 82,
botkey: '在bot.im中创建的机器人botkey',
authbasic: 'eW91cmVtYWlsQG1haWwuY29tOnBhc3N3b3Jk' // new Buffer('username:password').toString('base64'); 用于HTTP认证
});
// 监听消息,详见http://bot.im/developers/api#sendmessage
waiter.onmessage = function (msg, response) {
response('*' + msg.user + '*:' + msg.msg); // 直接回复消息,也可以用imbot.send来发送
}
// 启动机器人
waiter.run();
// 关闭机器人
waiter.close();
waiter.send({
userkey: '816B6956-E7F5-4861-89FA372C62F7DB14', // userkey,可以通过imbot.getUser来获取,详见http://bot.im/developers/api#sendmessage
msg: '同志们辛苦啦'
}, function (d) {
console.log(d);
});
// 成功:{ stat: 'ok', success: 'sent' }
// 失败:{ stat: 'fail', error: 'Invalid UserKey' }
waiter.updateStatus({network: 'Jabber', msg: 'ok'}, function (d) {
console.log(d);
});
// 详见http://bot.im/developers/api#status
// 成功:{ stat: 'ok', success: 'updated' }
// 失败:{ stat: 'fail', error: 'The your bot is not activated on the network you specified.' }
waiter.getUser({userkey: '816B6956-E7F5-4861-89FA372C62F7DB14'}, function (d) {
console.log(d);
});
// 详见http://bot.im/developers/api#getuser
// 成功:{ stat: 'ok', user: { status: '', ...} }
// 失败:{ stat: 'fail', error: 'Invalid UserKey' }
waiter.getAllUsers({}, function (d) {
console.log(d);
});
//详见http://bot.im/developers/api#getallusers
// 成功:{ stat: 'ok', users: [user: { status: '', ...}, ..] }
FAQs
An IM Bot for NodeJs, base on bot.im API. Simple to create the AIM, Yahoo, Jabber, and MSN bot.
The npm package imbot receives a total of 2 weekly downloads. As such, imbot popularity was classified as not popular.
We found that imbot demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Research
Security News
Socket’s Threat Research Team has uncovered 60 npm packages using post-install scripts to silently exfiltrate hostnames, IP addresses, DNS servers, and user directories to a Discord-controlled endpoint.
Security News
TypeScript Native Previews offers a 10x faster Go-based compiler, now available on npm for public testing with early editor and language support.