
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
A middleware that will degrade your express server's performance. For development purposes only.
A middleware that will degrade your express server's performance.
Developers often forget to account for API issues when building applications. Sometimes there might be network issues, sometimes the server might be unreachable for some reason. This middleware will help you build applications that are resilient to such situations by forcing you to handle them in development.
npm install bad-server
import { badServer } from "bad-server";
app.use(badServer());
router.get("/api", badServer(), (req, res, next) => res.send("Hello World"));
badServer
accepts a single options parameter that you can use to configure how the middleware should work. The default options are used if no options are specified.
Option | Default | Description |
---|---|---|
delay | - | Fixed amount of delay for the response in milliseconds, takes precedence over maxDelay |
maxDelay | 250 | Variant amount of delay for the response in milliseconds |
failRate | 0.1 (10%) | A number between 0 and 1 expressing the likelyhood of rejecting a request with a 500 error |
httpStatus | - | Causes the request to resolve with the specified HTTP status code and response |
response | - | Response body used with httpStatus |
badServer({ delay: 3000 });
badServer({ maxDelay: 1000 });
badServer({ failRate: 0.5 });
badServer({ httpStatus: 401, response: "Invalid Credentials" });
FAQs
A middleware that will degrade your express server's performance. For development purposes only.
The npm package bad-server receives a total of 0 weekly downloads. As such, bad-server popularity was classified as not popular.
We found that bad-server 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 uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.