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.
alldata-server-http
Advanced tools
Stability: 1 - Experimental
Server HTTP module for AllData, a distributed master-less write-once immutable event store database implementing "All Data" part of Lambda Architecture.
var AllDataServer = require('alldata-server-http');
var allDataServer = new AllDataServer({
hostname: 'localhost',
port: 8080
});
allDataServer.on('put', function (event, callback) {
console.log('received request to put: ' + event);
// process the event
callback(); // indicate success
});
allDataServer.listen(function () {
console.log('server listening...');
});
npm test
AllDataServer will listen to HTTP POST
requests containing the event encoded as a JSON string in the POST body.
Public API
options
: See new AllDataServer(options)
options
.callback
: See allDataServer.listen(callback)
callback
.Creates new AllDataServer and starts the server.
options
: Object
hostname
: String (Default: undefined) Hostname for the server to listen on. If not specified, the server will accept connections directed to any IPv4 address (INADDR_ANY
).port
: Integer (Default: 8080) Port number for the server to listen on.Creates a new AllDataServer instance.
callback
: Function (Default: undefined) function () {}
Optional callback to call once the server is stopped.Stops the server from accepting new connections.
callback
: Function (Default: undefined) function () {}
Optional callback to call once the server is up.Starts the server to listen to new connections.
put
function (event, callback) {}
event
: Object JavaScript object representation of the event to put.callback
: Function function (error) {}
The callback to call with an error or success of the put
operation.Emitted when the server receives a new put
request from a client.
Signal error via callback(true)
and success via callback()
.
allDataServer.on('put', function (event, callback) {
console.log('received request to put: ' + event);
// ... process the put
callback();
});
FAQs
AllData HTTP server module
We found that alldata-server-http 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.