
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
capture-har2
Advanced tools
Fetch requests in HAR format
This module makes a request and captures it as a HAR object. Under the covers it uses request and just passes through all options. Currently only GET requests are supported although other methods will probably work. The request body might not be properly captured though.
var captureHar = require('capture-har');
captureHar({
url: 'http://www.google.com'
}, { withContent: false })
.then(har => {
console.log(JSON.stringify(har, null, 2));
});
The result of code this can be found in example.json.
captureHar
captureHar(Object|String requestOptions, [ Object harOptions ]) -> Promise<Object>
requestOptions
The options for making the request, is just passed through to request package. This can accept the url directly.
harOptions
Optional configuration for the resulting HAR object.
withContent
Defaults to true
. Specifies whether the response content object should contain the full body of the response.
maxContentLength
Defaults to Infinity
. Limits the response body to a maximum byte size.
If the response body is larger than the specified limit, the content text won't exist and an error will be returned for this entity with the code MAX_RES_BODY_SIZE
.
FAQs
Fetch requests in HAR format
The npm package capture-har2 receives a total of 0 weekly downloads. As such, capture-har2 popularity was classified as not popular.
We found that capture-har2 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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.