
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@zhike/co-wechat-api
Advanced tools
微信公共平台API。
此项目 Fork 自原作者项目,原因是微信公众平台添加了一些新的接口,找其他包要考虑历史兼容性问题,于是决定在此包上扩展,由于仅针对内部使用,所以可能不够完善,将来也不会合回主项目
详细参见API文档
$ npm install co-wechat-api
var WechatAPI = require('co-wechat-api');
async function() {
var api = new WechatAPI(appid, appsecret);
var result = await api.updateRemark('open_id', 'remarked');
}
当多进程时,token需要全局维护,以下为保存token的接口:
var api = new API('appid', 'secret', async function () {
// 传入一个获取全局token的方法
var txt = await fs.readFile('access_token.txt', 'utf8');
return JSON.parse(txt);
}, async function (token) {
// 请将token存储到全局,跨进程、跨机器级别的全局,比如写到数据库、redis等
// 这样才能在cluster模式及多机情况下使用,以下为写入到文件的示例
await fs.writeFile('access_token.txt', JSON.stringify(token));
});
原始API文档请参见:消息接口指南。
The MIT license.
FAQs
微信公共平台Node库API,ES6版本
We found that @zhike/co-wechat-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 open source maintainers 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.