
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
html-png-stream
Advanced tools
Convert a stream of HTML documents into PNG Buffer Objects
This module is installed via npm:
$ npm install html-png-stream
Render some HTML into a PNG Buffer Object
var htmlPngStream = require('html-png-stream');
var ps = htmlPngStream({ width: 1280, height: 720, browser: 'phantomjs' });
var rs = stream.Readable();
rs._read = function () {};
rs.pipe(ps);
ps.on('data', function (data) {
// data will contain a screenshot of the HTML as a node.js Buffer
console.log(data);
//<Buffer 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 02 80 ...>
});
// render some HTML
rs.push('<b>Hello</b>');
The constructor is passed an options object:
width
, height
- the width and height of the browser. NB: This is not the
maximum dimensions of each screenshot. So if the rendered page is higher than
height
the screenshot returned will be the full rendered height of the page.browser
- The browser to use for rendering. By default this is phantomjs
and this module bundles together a static binary of phantomjs with
phantomjs-bin. If you have
Google Chrome installed and chromedriver
is in your PATH
, then you can
render with Chrome.You can pipe a HTML fragment or a URL to this stream and it will be rendered.
FAQs
Convert a stream of HTML documents into PNG Buffer Objects
We found that html-png-stream demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.