
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.
libpag-miniprogram
Advanced tools
官网 | English | Web版本 | Weblite版本 | 小程序版本 | 小程序lite版本
libpag 是 PAG (Portable Animated Graphics) 动效文件的渲染 SDK,目前已覆盖几乎所有的主流平台,包括:iOS, Android, macOS, Windows, Linux, 以及 Web 端。
PAG Web 端,由 libpag.js + libpag.wasm.br 文件组成。
$ npm install libpag-miniprogram
点击「微信开发者工具」- 「工具」- 「构建npm」,进行小程序 npm 依赖构建
// index.js
import { PAGInit } from 'libpag-miniprogram';
Page({
async onReady() {
this.PAG = await PAGInit({locateFile: (file) => '/utils/' + file});
}
})
<!-- index.wxml -->
<canvas type="webgl" id="pag" style="width: 300px; height:300px;"></canvas>
// index.js
wx.createSelectorQuery()
.select('#pag')
.node()
.exec(async (res) => {
const canvas = res[0].node;
const buffer = await loadFileByRequest('https://pag.io/file/test.pag');
const pagFile = await this.PAG.PAGFile.load(buffer);
const pagView = await this.PAG.PAGView.init(pagFile, canvas);
pagView.play();
});
const loadFileByRequest = async (url) => {
return new Promise((resolve) => {
wx.request({
url,
method: 'GET',
responseType: 'arraybuffer',
success(res) {
if (res.statusCode !== 200) {
resolve(null);
}
resolve(res.data);
},
fail() {
resolve(null);
},
});
});
};
FAQs
Portable Animated Graphics
The npm package libpag-miniprogram receives a total of 16 weekly downloads. As such, libpag-miniprogram popularity was classified as not popular.
We found that libpag-miniprogram demonstrated a healthy version release cadence and project activity because the last version was released less than 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
/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.