
Research
/Security News
Malicious npm Packages Target WhatsApp Developers with Remote Kill Switch
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
heatmap-pkg
Advanced tools
Heatmaps for node.js and the browser!
const Heatmap = require("heatmap");
const fs = require("fs");
const heat = new Heatmap(500, 500, { radius: 30 });
for (let i = 0; i < 5000; i += 1) {
let rho = Math.random() * 2 * Math.PI;
let z = Math.pow(Math.random(), 2) * 200;
let x = 250 + Math.cos(rho) * z;
let y = 250 + Math.sin(rho) * z;
heat.addPoint(x, y);
}
heat.draw();
fs.writeFileSync("blob.png", heat.canvas.toBuffer());
There are two ways of creating a new heatmap:
Optionally, you can set the opts.radius
and opts.threshold
to control the
rendering a little.
Add a point to the heatmap with a radius
.
params
must be an object and can have:
Scale the canvas by the coefficients x
and y
.
If y
is undefined, scale both x and y by the first parameter, x
.
Render all the points onto the canvas element.
The HTML Canvas element.
Protip: with the canvas module for
node you can heat.canvas.buffer()
to get a Buffer with a PNG file all up in it.
With npm, just do:
npm install heatmap-pkg
Or with yarn:
yarn add heatmap-pkg
FAQs
A package for heatmaps on node.js and the browser
The npm package heatmap-pkg receives a total of 2 weekly downloads. As such, heatmap-pkg popularity was classified as not popular.
We found that heatmap-pkg 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.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.
Research
/Security News
Socket uncovered 11 malicious Go packages using obfuscated loaders to fetch and execute second-stage payloads via C2 domains.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.