
Research
Malicious fezbox npm Package Steals Browser Passwords from Cookies via Innovative QR Code Steganographic Technique
A malicious package uses a QR code as steganography in an innovative technique.
wwwdude is a small and flexible http client library on top of node's http.Client.
You can install install wwwdude via npm:
npm install wwwdude
A working example:
var sys = require('sys'),
wwwdude = require('wwwdude');
var client = wwwdude.createClient({
headers: { 'User-Agent': 'wwwdude test 42' },
gzip: true
});
client.get('http://google.com/')
.addListener('error', function (err) {
sys.puts('Network Error: ' + sys.inspect(err));
})
.addListener('http-error', function (data, resp) {
sys.puts('HTTP Error for: ' + resp.host + ' code: ' + resp.statusCode);
})
.addListener('redirect', function (data, resp) {
sys.puts('Redirecting to: ' + resp.headers['location']);
sys.puts('Headers: ' + sys.inspect(resp.headers));
})
.addListener('success', function (data, resp) {
sys.debug('Got data: ' + data);
sys.puts('Headers: ' + sys.inspect(resp.headers));
});
Creates a new client object with predefined options for each request made with this instance.
The createClient call returns a Request object. On this object you can call a method for each supported HTTP verb.
Creates a HTTP GET request
Creates a HTTP PUT request
Creates a HTTP POST request
Creates a HTTP DELETE request
Creates a HTTP HEAD request
The customHeaders hash contains a set of HTTP headers which should be added to a request. They are optional. A working example would be:
customHeaders = { 'User-Agent': 'Foo', 'Accept': 'text/html', 'Content-Type': 'application/json' };
Every request call returns a Request object that emits events. You can add listeners for all those events.
To register for an event, you can use the addListener() method.
request.addListener(event, function (data, response) { doSomeThing(); });
There is also a shorter alternative method called on():
request.on(event, function (data, response) { doSomeThing(); });
The passed callback function takes two parameters: data and response. Data contains the content returned from the server.
The send() call has been removed. Please don't use it!
To run the unit tests, expresso and connect are required. You can install it via npm:
npm install expresso connect
There's a Makefile to run the tests:
make test
wwwdude is licensed under the MIT license.
FAQs
Simple to use HTTP library on top of the built in libs of node.js
The npm package wwwdude receives a total of 3 weekly downloads. As such, wwwdude popularity was classified as not popular.
We found that wwwdude demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers 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
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.
Application Security
/Research
/Security News
Socket detected multiple compromised CrowdStrike npm packages, continuing the "Shai-Hulud" supply chain attack that has now impacted nearly 500 packages.