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.
async-request
Advanced tools
async-request is a wrapper for request that uses ES7 async functions.
let request = require('async-request'),
response;
try {
response = await request('http://gajus.com/');
// response.statusCode
// response.headers
// response.body
await request('http://gajus.com', {
// This example demonstrates all of the supported options.
// Request method (uppercase): POST, DELETE, ...
method: 'POST',
data: {
foo: 'bar'
},
headers: {
foo: 'bar'
},
proxy: 'http://127.0.0.1:8000'
});
} catch (e) {
}
// Returns a wrapper for the request using predefined custom options.
request = request.defaults({headers: {foo: 'bar'}});
// Returns the current default options.
request.defaults();
// {foo: 'bar'}
// Makes a HTTP GET request with {foo: 'bar'} headers.
await request('http://gajus.com');
async-request
does not provide (expose) inbuilt debugging capabilities. Use a proxy (e.g. https://mitmproxy.org/) to intercept and analyze HTTP traffic.
Async function behavior has been accepted into stage 1 ("Proposal") of the ECMASCript 7 spec process in January 2014. This means that it cannot be used out of the box with node.js or iojs without a transpiler.
This library is using Babel to compile ES7 code into ES5. Refer to the ./gulpfile.js.
This library has been created as part of ES7 async function proposal research. It covers basic use of request. I do not advise to use it in production, though I will be testing it in several private projects and update as I go – contributions are welcome too.
FAQs
async-request is a wrapper for request that uses ES7 async functions.
The npm package async-request receives a total of 3,359 weekly downloads. As such, async-request popularity was classified as popular.
We found that async-request 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’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.