
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
A simple interface for Modbus
const modbus = require('modbus')
//Create a TCP Device
const device = modbus(ipAddress,port,unitId)
//Create an RTU Device
const device = modbus(commPort,baudRate)
//Read
let myCoil = await device.read('c0')
let myHoldingRegister = await device.read('hr0')
let myHoldingRegisters = await device.read('hr1-2')
//Write
await device.write('c0',true)
await device.write('hr0',15)
const modbus = require('modbus')
const tcpDevice = modbus(ipAddress,port,unitId)
[Short Hand + Register Number]
Data Type Short Hand Size Accessibility
Descrite Input i 1 Bit Read Only
Coil c 1 Bit Read / Write
Input Register ir 16 Bits Read Only
Holding Register hr 16 Bits Read / Write
If modbus is not compiled for the correct version of Node.js, you will not be able to communicate via Modbus RTU. (Modbus TCP is not affected)
When you install modbus it will compile against the version of Node.js on your machine, not against the Node.js runtime bundled with Electron.
To recompile modbus (or any native Node.js module) for Electron, you can use electron-rebuild
Install modbus:
npm i modbus
Install electron-rebuild with --save-dev:
npm install --save-dev electron-rebuild
Run electron-rebuild:
$(npm bin)/electron-rebuild
Or if you're on Windows:
.\node_modules\.bin\electron-rebuild.cmd
FAQs
A simple API for Modbus
The npm package modbus receives a total of 11 weekly downloads. As such, modbus popularity was classified as not popular.
We found that modbus 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.