Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
const Qyu = require('qyu');
(async () => {
let q = new Qyu({concurrency: 3});
// Basic:
q.add(myAsyncFunction);
// Extra options:
q.add({priority: 7}, myAsyncFunction, arg1, arg2/*...*/));
// Doesn't matter if more jobs come around later,
// Qyu will queue them as necessary and optimally manage them all
// for you based on your concurrency setting
// as necessary:
setTimeout(() => {
for (let i=0; i<10; i++) {
q.add(myAsyncFunction);
}
}, 2000);
await q.whenEmpty(); // When all tasks finished and queue is empty...
})();
qyu
is a general-purpose asynchronous job queue for Node.js. It's flexible and easy to use, and always accepting jobs and running them as fast as the concurrency settings dictates.
Qyu was meant for:
...
const
Qyu = require('qyu'),
axios = require('axios'),
cheerio = require('cheerio');
(async () => {
let siteUrl = 'http://www.store-to-crawl.com/products';
let q = new Qyu({concurrency: 3});
for (let i=1; i<=10; i++) {
q.add(async () => {
let { data: html } = await axios(siteUrl+'?page='+i);
let $ = cheerio.load(html);
let products = []
$('.prod-list .product').each((i, elem) => {
let $elem = $(elem);
let title = $elem.find('.title').text();
let price = $elem.find('.price').text();
products.push({ title, price });
});
// Do something with products...
});
}
await q.whenEmpty();
// All done!
})();
FAQs
A general-purpose asynchronous job queue for Node.js
The npm package qyu receives a total of 995 weekly downloads. As such, qyu popularity was classified as not popular.
We found that qyu 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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.