
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.
@aftership/rate-limiter
Advanced tools
Rate limit for Node.js, with ioredis client
npm install @aftership/rate-limiter
The client must be an instance of ioredis
library.
const Limiter = require('@aftership/rate-limiter');
const Redis = require('ioredis');
const redisClient = new Redis({
port: 6379,
host: '127.0.0.1',
db: 0
});
redisClient.on('connect', (err) => {
if (err) {
console.log(err);
return;
}
// limit to 2 request per every 10s
const limiter = new Limiter({
redisClient,
key: 'the-user-api-key',
limit: 2, // default is 10
duration: 10 // default is 60s
});
limiter
.get()
.then((result) => {
console.log(result);
if (result.remaining >= 0) {
console.log('I can do the request!');
} else {
console.log(`I run out of limit! Try again after ${result.reset} second.`);
}
process.exit(0);
})
.catch((e) => {
console.log(e);
});
});
Please refer to release page
Copyright (c) 2019 AfterShip
Licensed under the MIT license.
FAQs
Rate limit for Node.js, with ioredis client
We found that @aftership/rate-limiter 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
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.