Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Experiments in CSP after reading:
You probably shouldn't use this. Although there are tests, I don't fully understand CSP / transducers yet!
Then I also read:
Supports:
Does not require generators!
See test.js. Otherwise here's an example of finding the mouse vector:
var td = require('transducers-js');
var csp = require('./');
var chan = csp.chan;
var put = csp.put;
var take = csp.take;
// Create a channel with a buffer of size 2 using a sliding window strategy,
// with a transducer that groups as tuples.
var ch = chan([csp.SLIDING, 2], td.partitionAll(2));
// Built without generators, so we need our own "event loop".
(function next() {
take(ch, function(ps) {
var p1 = ps[0];
var p2 = ps[1];
if (p1 === chan.CLOSED || p2 === chan.CLOSED) return;
document.body.innerHTML = ''
+ '<span style="font-size: 72px; text-align: center;">'
+ (p2.x - p1.x) + ', ' + (p2.y - p1.y)
+ '</span>'
next();
})
}())
// Always put the newest event into the channel.
document.body.addEventListener('mousemove', function(event) {
put(ch, { x: event.clientX, y: event.clientY });
}, false)
Wanted to play around, also wanted to see how small (yet practical) I could make it, transducers and all. Generators are obviously possible via transpilation, but this provides a test bed for playing around in an environment without them.
MIT
FAQs
Playing with CSP without generators
The npm package csp-ksh receives a total of 0 weekly downloads. As such, csp-ksh popularity was classified as not popular.
We found that csp-ksh 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 uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.