
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.
then-busboy
Advanced tools
Promise-based wrapper around Busboy, inspired by async-busboy
Note: The current documentation is for 2.x versions of then-busboy. If you're looking for a previous version, check out the 1.x branch.
Use can install then-busboy
from npm:
npm install --save then-busboy
Or with yarn:
yarn add then-busboy
busboy(request[, options]) -> Promise<Object>
constructor File(options)
contents
A file contents Readable stream.
stream
An alias for contents
filename
A full name of the file
basename
A name of the file without extension
extname
A file extension
mime
A file mime type
enc
path
Default path of the file
read() => Promise<Buffer>
Read a file from contents stream.
write([path]) => Promise<void>
Write a file content to disk. Optionally you can set a custom path.
By default, file will be saved in system temporary directory os.tmpdir()
.
You can take this path from path property.
Just import then-busboy
and pass request
object as first argument.
import busboy from "then-busboy"
import {createServer} from "http"
function handler(req, res) {
// Get result from then-busboy
function onFulfilled(data) {
res.writeHead("Content-Type", "application/json")
res.end(JSON.stringify(data))
}
// Handle errors
function onRejected(err) {
res.statusCode = err.status || 500
res.end(String(err))
}
// Call `then-busboy` with `req`
busboy(req).then(onFulfilled, onRejected)
}
createServer(handler)
.listen(2319, () => console.log("Server started on http://localhost:2319"))
then-busboy
always returns a Promise, so you can use it with
asynchronous function syntax:
// Some of your awesome code with async workflow...
const data = await busboy(req)
FAQs
Promise-based wrapper around Busboy. Processes multipart/form-data request body and returns it in a single object.
We found that then-busboy 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.