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.
multi-part-stream-parser
Advanced tools
Parse multi-part form data streams
Multi-Part-Stream-Parser provides a capture mechanism for parsing multi-part encoded streams, allowing consumers to listen for each section (split by boundary) of a multi-part document.
Simply install by running npm install multi-part-stream-parser --save
.
Compatible with NodeJS 18 and up.
Pass a readable stream of multi-part data to parseMultiPartStream
:
import { ParseEvent, parseMultiPartStream } from "multi-part-stream-parser";
// ...
const stream = getMultiPartStream(); // get a stream somehow
const emitter = parseMultiPartStream(stream);
emitter.on(ParseEvent.SectionHeaders, (sectionName, headers) => {
// sectionName is a string, or null of not specified
// headers is an object containing lower-cased headers
});
emitter.on(ParseEvent.SectionContent, (sectionName, contentBuffer) => {
// contentBuffer is a buffer that contains the full
// contents of the section
});
emitter.on(ParseEvent.SectionContentStream, (sectionName, contentStream) => {
// contentStream is a readable stream of the section
// contents
});
// ...
// Cleanup
emitter.destroy();
await emitter.whenComplete();
FAQs
Multi-part form data stream parser
The npm package multi-part-stream-parser receives a total of 126 weekly downloads. As such, multi-part-stream-parser popularity was classified as not popular.
We found that multi-part-stream-parser demonstrated a healthy version release cadence and project activity because the last version was released less than 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.