
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Encode/decode raw tcp packets. Currently very incomplete.
$ npm install tcp-packet
const tcp = require('tcp-packet')
const packet = tcp.decode(Buffer.from('c3560050ee7d2560b5e66669801801c90a5900000101080a000276e95dd3f7a668656c6c6f0a', 'hex'))
console.log(packet)
/*
{
sourcePort: 50006,
destinationPort: 80,
sequenceNumber: 4001178976,
acknowledgmentNumber: 3051775593,
dataOffset: 8,
flags: 24,
reserved: 0,
ns: 0,
cwr: 0,
ece: 0,
urg: 0,
ack: 1,
psh: 1,
rst: 0,
syn: 0,
fin: 0,
windowSize: 457,
checksum: 2649,
urgentPointer: 0,
data: <Buffer 68 65 6c 6c 6f 0a>
}
*/
console.log(packet.data.toString())
// hello\n
Encodes a packet. Returns a buffer. The packet should look like this:
{
data: <Buffer>,
sourcePort: 12345,
destinationPort: 80,
sequenceNumbe: 1234567,
acknowledgmentNumber: 7654321
}
Decodes a packet from a buffer. A buffer could look like Buffer.from('c3560050ee7d2560b5e66669801801c90a5900000101080a000276e95dd3f7a668656c6c6f0a', 'hex'))
and return something like this:
{
sourcePort: 50006,
destinationPort: 80,
sequenceNumber: 4001178976,
acknowledgmentNumber: 3051775593,
dataOffset: 8,
flags: 24,
reserved: 0,
ns: 0,
cwr: 0,
ece: 0,
urg: 0,
ack: 1,
psh: 1,
rst: 0,
syn: 0,
fin: 0,
windowSize: 457,
checksum: 2649,
urgentPointer: 0,
data: <Buffer 68 65 6c 6c 6f 0a>
}
FAQs
Encode/decode raw tcp packets. *Currently very incomplete*.
The npm package tcp-packet receives a total of 2 weekly downloads. As such, tcp-packet popularity was classified as not popular.
We found that tcp-packet 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
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.