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.
@network-utils/dhcp
Advanced tools
NodeJS implementation of DHCP socket connection
npm install @network-utils/dhcp
Module has got TypeScript declarations. It can be helpful to understand the module API
"use strict";
let { BOOTMessageType, Server } = require("@network-utils/dhcp");
let s = new Server("192.168.1.1");
s.on("listening", () => {
console.log("Server start", s.address);
});
s.on("dhcp", e => {
console.log(e.packet.toString());
});
s.bind();
"use strict";
let { BOOTMessageType, Server } = require("@network-utils/dhcp");
let s = new Server({
serverId: "192.168.1.1",
gateways: ["192.168.1.1"],
domainServer: ["192.168.1.1"],
});
s.on("listening", () => {
console.log("Server start", s.address);
});
let ips = {};
s.on("discover", e => {
console.log("DISCOVER");
let pkt = e.packet;
// Get IP by MAC
let ip = "0.0.0.0";
if (pkt.op === BOOTMessageType.request) {
if (!(pkt.chaddr in ips))
ip = ips[pkt.chaddr] = `192.168.1.${Object.keys(ips).length + 2}`;
else
ip = ips[pkt.chaddr];
}
let offer = s.createOffer(pkt);
offer.yiaddr = ip;
s.send(offer);
});
s.on("request", e => {
console.log("REQUEST");
let ack = s.createAck(e.packet);
ack.yiaddr = ips[e.packet.chaddr];
s.send(ack);
});
s.on("release", e => {
console.log("RELEASE");
delete ips[e.packet.chaddr];
});
s.bind();
FAQs
NodeJS implementation of DHCP socket connection
The npm package @network-utils/dhcp receives a total of 45 weekly downloads. As such, @network-utils/dhcp popularity was classified as not popular.
We found that @network-utils/dhcp 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
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.