
Research
SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.
Streaming human readable command protocol
npm install hprotocol
hprotocol is a redis like protocol that its easy to parse both for programs and human beings. As an example lets echo a value
var hprotocol = require('hprotocol');
var net = require('net');
net.createServer(function(socket) {
var protocol = hprotocol();
client.on('message', function(cmd, args, callback) {
// listen for the echo command
if (cmd === 'echo') return callback(null, args);
callback(new Error('unknown command'));
});
// setup the pipe chain
socket.pipe(protocol).pipe(socket);
}).listen(9999);
Open a new termainal and try interfacing with the server.
$ nc localhost 9999 # create a socket to the server
$ echo test # send a echo command
$ > test # this is the reply from the server
Similary you can interface with the server using node:
var protocol = hprotocol(); // using the same protocol as above
var socket = net.connect(9999, 'localhost');
socket.pipe(protocol).pipe(socket);
protocol.send('echo', ['test'], function(err, value) {
console.log(value); // prints ['test']
});
All messages are seperated by newlines and arguments are seperated by whitespace.
command arg1 arg2 ...
A response starts with > and error responses start with !
echo a b c
> a b c
bad
! unknown command
If you do care about the response send ~ before the command
~echo a b c
MIT
FAQs
Streaming human readable command protocol
The npm package hprotocol receives a total of 24 weekly downloads. As such, hprotocol popularity was classified as not popular.
We found that hprotocol 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
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.