
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.
koa-image-placeholder
Advanced tools
一个简单的koa中间件, 用于生成占位图.
npm install koa-image-placeholder --save
rectColor
: 图片背景色(默认: #EEEEEE
)fontSize
: 字体大小(默认: 12
)fontColor
: 字体颜色(默认: #AAAAAA
)io
: 是否只展示占位图, 不展示任何其他的信息(默认: n
)注册一个路由来响应中间件的占位图返回值(参照下方的示例代码).
url
的query
接收四个参数
size
(必须): 图片尺寸, 格式widthxheight
(100x100).text
(可选): 图片上展示的文字bg
(可选): 图片背景色, aabbcc
格式, 不带#fc
(可选): 图片上展示的文字颜色, aabbcc
格式, 不带#io
(可选): image only
, 若设置为y
, 则文字以及尺寸信息将不再展示, fc设置也将无效, 只展示一个纯色的占位图(默认不包含该参数)例: /placeholder?size=200x200&text=妈个蛋&bg=000&fc=FFF
"use strict";
const url = require('url');
const koa = require('koa');
const router = require('koa-router');
const imagePlaceholder = require('../index');
const app = koa();
app.use(router(app));
app.get('/placeholder', imagePlaceholder({
rectColor: '#333',
fontSize: '10',
fontColor: '#FFF'
}));
app.get('/home', function *() {
this.body = '<h1>Home</h1><img src="/placeholder?size=300x300&text=妈个蛋&bg=000&fc=FFF" />'
});
app.listen(8080);
DEBUG=koa-image-placeholder
FAQs
简单的koa模块, 生成占位图.
The npm package koa-image-placeholder receives a total of 1 weekly downloads. As such, koa-image-placeholder popularity was classified as not popular.
We found that koa-image-placeholder 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
/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.