
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
computes-mesh
Advanced tools
NPM module for creating, connecting, computing, and messaging on the computes.io supercomputer mesh network. Node module includes Kernel + Core + Messaging Engine in each node. (more details)
$ npm install computes-mesh
This version requires the go-ipfs daemon running in pubsub mode:
$ ipfs daemon --enable-pubsub-experiment
Here's the Node.JS code:
const computes = require('computes-mesh');
var job = computes.connect("domain-key-provided-by-computes.io");
Event fires when node is successfully connected to computes mesh network.
Sends computes request to next available core in the network. Operations can be Javascript text strings or a URL such as a raw gist or an IPFS hash or an NPM URL
Listens for results from computes requests. The result contains the core's computational result.
Sends message (string or buffer) to all nodes on the domain or to a specific nodeID.
Listens for messages. data
is an object containing the following properties:
from
(string): peer idmessage
(Buffer): message contentReturns array of peers attached to domain.
Leaves domain.
Leaves domain, stopping everything.
This example echos 1 to 1000 across all of the nodes on the mesh network. It also demonstrates the message API:
const computes = require('computes-mesh');
var job = computes.connect("domain-key-provided-by-computes.io");
var operation = "(function(data) { var result = data; return result; })";
job.on("ready", function (){
console.log("connected to ipfs...");
for(var data = 0; data < 1000; data++) {
job.compute(operation, data);
}
});
// Fires as cores return results
job.on("result", function (result){
console.log(result);
// Demo broadcasting message with result
job.message("domain-key-provided-by-computes.io", result);
});
// Fires when messages are received
job.on("message", function (msg){
console.log(msg);
});
Notes:
Operations can also be a URL such as a raw gist or an IPFS hash or an NPM URL i.e.
FAQs
Computes core, kernel, and messaging engine
The npm package computes-mesh receives a total of 84 weekly downloads. As such, computes-mesh popularity was classified as not popular.
We found that computes-mesh demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.