
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
http-request-builder
Advanced tools
Build HTTP request message from an object model. Can be used on server and client sides. To parse request message and create an object model for it, use http-request-parser.
multipart/form-data
, application/x-www-form-urlencoded
, text/plain
)$ npm i -S http-request-builder
const builder = require('http-request-builder');
let requestObj = {
method: 'GET',
protocol: 'HTTP',
url: 'example.com/features?p1=v1',
protocolVersion: 'HTTP/1.1',
host: 'example.com',
headers: [
{ name: 'Connection', values: [ { value: 'keep-alive' } ] },
{ name: 'Cache-Control', values: [ { value: 'no-cache' } ] },
{ name: 'User-Agent', values: [ { value: 'Mozilla/5.0 (Windows NT 6.1 WOW64)' } ]},
{ name: 'Accept', values: [ { value: '*/*' } ] },
{ name: 'Accept-Encoding', values: [
{ value: 'gzip' },
{ value: 'deflate' }
]},
{ name: 'Accept-Language', values: [
{ value: 'en-US', params: 'q=0.6' },
{ value: 'en', params: 'q=0.4' }
]}
],
cookie: [
{ name: 'csrftoken', value: '123abc' },
{ name: 'sessionid', value: '456def' }
]
};
let requestMsg = builder.build(requestObj);
console.log(requestMsg);
/* prints:
GET http://app.com/features?p1=v1 HTTP/1.1
Host: app.com
Connection: keep-alive
Cache-Control: no-cache
User-Agent: Mozilla/5.0 (Windows NT 6.1 WOW64)
Accept: /
Accept-Encoding: gzip, deflate
Accept-Language: en-US;q=0.6, en;q=0.4
Cookie: csrftoken=123abc; sessionid=456def
*/
Alexander Mac
Licensed under the MIT license.
FAQs
Build HTTP request message from an object model
The npm package http-request-builder receives a total of 1 weekly downloads. As such, http-request-builder popularity was classified as not popular.
We found that http-request-builder 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
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.