Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
cncjs-controller
Advanced tools
A controller library for event-based communication between client and CNCjs server.
A controller library for event-based communication between client and CNCjs server
npm install --save cncjs-controller@1.x
npm install --save socket.io-client
import io from 'socket.io-client';
import Controller from 'cncjs-controller';
const controller = new Controller(io);
const host = ''; // e.g. http://127.0.0.1:8000
const token = '<security-token>';
const options = {
query: 'token=' + token
};
controller.connect(host, options, () => {
const port = '/dev/cu.wchusbserialfa130';
controller.openPort(port, {
controllerType: 'Grbl', // Grbl|Smoothie|TinyG
baudrate: 115200
}, (err) => {
if (err) {
console.error(err);
return;
}
controller.writeln('$$'); // View Grbl Settings
});
// Disconnect after 60 seconds
setTimeout(() => {
// Close port
controller.closePort();
// Close connection
controller.disconnect();
}, 60 * 1000);
});
controller.addListener('serialport:open', (options) => {
const {
port,
baudrate,
controllerType
} = options;
console.log(`Connected to the port "${port}" with a baud rate of ${baudrate}.`, { port, baudrate });
});
controller.addListener('serialport:close', (options) => {
const { port } = options;
console.log(`The port "${port}" is disconnected.`);
});
controller.addListener('serialport:write', (data, context) => {
console.log('>', data);
});
controller.addListener('serialport:read', (data) => {
console.log('<', data);
});
MIT
FAQs
A controller library for event-based communication between client and CNCjs server.
The npm package cncjs-controller receives a total of 122 weekly downloads. As such, cncjs-controller popularity was classified as not popular.
We found that cncjs-controller demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.