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.
flood-protection
Advanced tools
Flood protection for realtime applications
npm install --save flood-protection
import FloodProtection from 'flood-protection';
const floodProtection = new FloodProtection({
rate: 5,
// default: 5, unit: messages
// IMPORTANT: rate must be >= 1 (greater than or equal to 1)
per: 8,
// default: 8, unit: seconds
});
import FloodProtection from 'flood-protection';
// ...
// io is a Socket.io instance...
io.on('connection', (client) => {
client.emit('connected');
const floodProtection = new FloodProtection();
client.on('message', (text) => {
if (floodProtection.check()) {
// forward message
io.emit('message', text);
} else {
// forbid message
client.emit('flood', {
text: 'Take it easy!',
});
}
});
});
MIT (c) 2017 Mehmet Yatkı
FAQs
Flood protection for realtime applications
The npm package flood-protection receives a total of 7 weekly downloads. As such, flood-protection popularity was classified as not popular.
We found that flood-protection 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.