
Research
/Security News
npm Author Qix Compromised via Phishing Email in Major Supply Chain Attack
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
dgram-broadcast
Advanced tools
A more obvious dgram broadcast.
dgram-broadcast
has the correct defaults to just work for broadcast on your
local area network.
Broadcast on port 8999
on your local area network.
const createStream = require('dgram-broadcast')
const stream = createStream(8999)
stream.on('data', (msg) => {
console.log(msg.toString())
console.log(msg.address, msg.port, msg.echo)
})
setInterval(() => {
stream.write(Buffer.from(new Date().toString(), 'utf8'))
}, 1000)
stream = createStream(port, loopback=true, dest=['255.255.255.255'])
Stream on the port port
. If
loopbackis false, do not output your own messages. Returns a Node.js stream.
destis an array of all the destination addresses on which to broadcast, by default it has only
255.255.255.255` as the
destination.
stream.on('data', (msg) => { ... })
msg
is the message as a buffer, it also has msg.address
and msg.port
set
to the address and port that originated the message. If msg
is a message that
this stream sent, it will also have msg.loopback = true
.
UDP does not have back-pressure, but the stream API in this module does. If the stream is paused, it will just drop messages. If when the stream is resumed, it will emit the latest message.
MIT
FAQs
A more obvious interface for local UDP broadcast
The npm package dgram-broadcast receives a total of 5 weekly downloads. As such, dgram-broadcast popularity was classified as not popular.
We found that dgram-broadcast 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
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.