Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cap

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cap - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

3

lib/Cap.js

@@ -1,3 +0,2 @@

var inherits = require('util').inherits,
EventEmitter = require('events').EventEmitter;
var EventEmitter = require('events').EventEmitter;

@@ -4,0 +3,0 @@ var addon = require('../build/Release/cap');

@@ -170,10 +170,10 @@ // Link Layer Protocols ========================================================

// 8-bit Traffic Class
info.class = ((b[offset] & 0x0F) << 4) + ((b[++offset] & 0xF0) >> 4);
ret.info.class = ((b[offset] & 0x0F) << 4) + ((b[++offset] & 0xF0) >> 4);
// 20-bit Flow Label
info.flowLabel = ((b[offset] & 0x0F) << 16) + b.readUInt16BE(++offset, true);
ret.info.flowLabel = ((b[offset] & 0x0F) << 16) + b.readUInt16BE(++offset, true);
offset += 2;
// 16-bit Payload Length
info.payloadlen = b.readUInt16BE(offset, true);
ret.info.payloadlen = b.readUInt16BE(offset, true);
offset += 2;

@@ -207,3 +207,3 @@

// TODO: parse extensions
if (curHeader === 0 || curHeader == 43 || curHeader === 60
if (curHeader === 0 || curHeader === 43 || curHeader === 60
|| curHeader === 135) {

@@ -238,3 +238,3 @@ // Header Extension Length field is in 8-byte units

offset || (offset = 0);
var type, code, checksum;
var type, code, checksum, i, j;

@@ -402,7 +402,7 @@ var ret = {

addrs = new Array(nAddrs);
for (var i = 0; i < nAddrs; ++i) {
for (i = 0; i < nAddrs; ++i) {
addr = '';
for (i = 0; i < 4; ++i) {
for (j = 0; j < 4; ++j) {
addr += b[offset++];
if (i < 3)
if (j < 3)
addr += '.';

@@ -419,3 +419,3 @@ }

checksum: checksum,
lifetime: mtu,
lifetime: lifetime,
addrs: addrs

@@ -422,0 +422,0 @@ };

{ "name": "cap",
"version": "0.0.5",
"version": "0.0.6",
"author": "Brian White <mscdex@mscdex.net>",

@@ -4,0 +4,0 @@ "description": "A cross-platform binding for performing packet capturing with node.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc