
Research
Namastex.ai npm Packages Hit with TeamPCP-Style CanisterWorm Malware
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.
node-screenshots
Advanced tools
`node-screenshots` is a native node.js screenshot library that supports Mac, Windows, and Linux systems without any dependencies.
node-screenshots is a native node.js screenshot library that supports Mac, Windows, and Linux systems without any dependencies.
English | 简体中文
| Operating System | node14 | node16 | node18 |
|---|---|---|---|
| Windows x64 | ✓ | ✓ | ✓ |
| Windows x32 | ✓ | ✓ | ✓ |
| Windows arm64 | ✓ | ✓ | ✓ |
| macOS x64 | ✓ | ✓ | ✓ |
| macOS arm64 | ✓ | ✓ | ✓ |
| Linux x64 gnu | ✓ | ✓ | ✓ |
| Linux x64 musl | ✓ | ✓ | ✓ |
const fs = require("fs");
const { Screenshots } = require("node-screenshots");
let capturer = Screenshots.fromPoint(100, 100);
console.log(capturer, capturer.id);
// Synchronous capture
let image = capturer.captureSync();
fs.writeFileSync("./a.png", image);
// Asynchronous capture
capturer.capture().then((data) => {
console.log(data);
fs.writeFileSync(`${capturer.id}.png`, data);
});
// Get all screen captures
let all = Screenshots.all() ?? [];
all.forEach((capturer) => {
console.log({
id: capturer.id,
x: capturer.x,
y: capturer.y,
width: capturer.width,
height: capturer.height,
rotation: capturer.rotation,
scaleFactor: capturer.scaleFactor,
isPrimary: capturer.isPrimary,
});
capturer.captureSync(true);
});
Screenshots.fromPoint(x, y): Get a screenshot from the specified coordinatesScreenshots.all(): Get all screenshotsscreenshots.capture(copyOutputData): Asynchronously capture full screenscreenshots.captureSync(copyOutputData): Synchronously capture full screenscreenshots.captureArea(x, y, width, height, copyOutputData): Asynchronously capture the specified areascreenshots.captureAreaSync(x, y, width, height, copyOutputData): Synchronously capture the specified areacopyOutputData: pass related parameters in electron, otherwise electron will crash, nodejs does not pass or passes false, performance will be better, for more information refer to https://github.com/napi-rs/napi-rs/issues/1346
On Linux, you need to install libxcb, libxrandr, and dbus.
Debian / Ubuntu:
apt-get install libxcb1 libxrandr2 libdbus-1-3
Alpine:
apk add libxcb libxrandr dbus
FAQs
Zero-dependent. A native nodejs screenshots library for Mac、Windows、Linux.
The npm package node-screenshots receives a total of 16,400 weekly downloads. As such, node-screenshots popularity was classified as popular.
We found that node-screenshots 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.

Research
Malicious Namastex.ai npm packages appear to replicate TeamPCP-style Canister Worm tradecraft, including exfiltration and self-propagation.

Product
Explore exportable charts for vulnerabilities, dependencies, and usage with Reports, Socket’s new extensible reporting framework.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.