
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.
@mesosphere/mockserver
Advanced tools
A mockserver that allows you to mock XHR, long-polling XHR, server sent events and websocket connections
We provide two interfaces, a CLI for the fast and easy way to interact with the mock server and a programmatic API to give you the control over everything.
The CLI is entirely controlled via environment variables, here are the ones you may configure
PROXY_HOST_PORT
(required): determine where to send the requests no mock matches against to. E.g. "my-service.com:2342"MOCK_SEARCH_EXPRESSION
(required): glob to specify where to search for mocks. E.g. "./*/-mock.js"PORT
(optional): port of the mockserverYour mocks should be defined in Javascript files as named export:
// The name is important!
export const mocks = [
{
id: "my-first-mock",
request: (req, res) => {
// Same interface as express middlewares
res.status(200);
}
}
];
Please note that we import these files at start time of the mockserver.
import mockserver from "mockserver";
// Every option is required
const { port, close } = await mockserver({
port: 0, // zero means "choose your own"
proxyHost: "my-service",
proxyPort: 42,
mocks: [
{
id: "my-first-mock",
request: (req, res) => {
// Same interface as express middlewares
res.status(200);
}
}
]
});
npm install
npm start
npm run watch
Please run npm test
FAQs
A mockserver that allows you to mock XHR, long-polling XHR, server sent events and websocket connections
We found that @mesosphere/mockserver demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 13 open source maintainers 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.