![Malicious npm Package Typosquats react-login-page to Deploy Keylogger](https://cdn.sanity.io/images/cgdhsj6q/production/007b21d9cf9e03ae0bb3f577d1bd59b9d715645a-1024x1024.webp?w=400&fit=max&auto=format)
Research
Security News
Malicious npm Package Typosquats react-login-page to Deploy Keylogger
Socket researchers unpack a typosquatting package with malicious code that logs keystrokes and exfiltrates sensitive data to a remote server.
trumpet
Advanced tools
Readme
Parse and transform streaming html using css selectors.
var transit = require('trumpet');
var tr = transit();
tr.select('.b span', function (node) {
node.html(function (html) {
console.log(node.name + ': ' + html);
});
});
var fs = require('fs');
fs.createReadStream(__dirname + '/select.html').pipe(tr);
<html>
<head>
<title>beep</title>
</head>
<body>
<div class="a">¡¡¡</div>
<div class="b">
<span>tacos</span>
<span>y</span>
<span>burritos</span>
</div>
<div class="a">!!!</div>
</body>
</html>
output:
$ node example/select.js
span: tacos
span: y
span: burritos
var trumpet = require('trumpet')
Create a new trumpet stream. This stream is readable and writable.
Pipe an html stream into tr
and get back a transformed html stream.
Optionally supply a function fn(node)
that will get raw parsing events.
node
is an object with these keys:
These nodes are different from the higher-level nodes you get with .select()
.
Fire fn(node)
for every element in the html stream that matches the css
selector
.
The nodes are described in the nodes section of this document.
The name of the html element node, such as 'div'
or 'span'
.
An object with all the html attributes.
For example,
<img src="/beep.png" width="32" height="32">
has an attribute object of:
{ src : 'beep.png', width : '32', height : '32' }
Get the inner text and html for the element, which may not have arrived yet.
cb(text)
fires when the inner contents are ready.
With npm do:
npm install trumpet
MIT/X11
FAQs
Unknown package
We found that trumpet 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
Socket researchers unpack a typosquatting package with malicious code that logs keystrokes and exfiltrates sensitive data to a remote server.
Security News
The JavaScript community has launched the e18e initiative to improve ecosystem performance by cleaning up dependency trees, speeding up critical parts of the ecosystem, and documenting lighter alternatives to established tools.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.