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

network

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

network - npm Package Compare versions

Comparing version 0.5.0 to 0.6.0

11

lib/darwin.js

@@ -78,2 +78,6 @@ "use strict";

};
exports.status_for = function(nic_name, cb){
var cmd = "netstat -rn | grep " + nic_name + ' | grep UG | wc -l | sed -e "s/1/active/" | sed -e "s/0/inactive/"'
trim_exec(cmd, cb)
}

@@ -93,2 +97,5 @@ exports.get_network_interfaces_list = function(cb) {

exports.netmask_for(obj.name, cb)
},
function(cb){
exports.status_for(obj.name, cb)
}

@@ -98,2 +105,3 @@ ], function(err, results) {

if (results[1]) obj.netmask = results[1];
if (results[2]) obj.status = results[2]

@@ -115,2 +123,3 @@ list.push(obj);

name = block.match(/Device: (\w+)/);

@@ -124,3 +133,3 @@ if (!parts || !mac || !name)

obj.name = name[1];
// obj.desc = port;
obj.desc = port;
obj.type = determine_nic_type(port);

@@ -127,0 +136,0 @@ obj.ip_address = null;

"use strict";
var needle = require('needle'),
os_functions = require('./' + process.platform);
var needle = require('needle');
var os_functions;
switch (process.platform) {
case 'win32':
os_functions = require('./win32');
break;
case 'linux':
os_functions = require('./linux');
break;
case 'darwin':
os_functions = require('./darwin');
break;
}
// var ip_regex = /((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){3}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})/;

@@ -7,0 +17,0 @@ var ip_regex = /(\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b)/;

2

package.json
{
"name": "network",
"version": "0.5.0",
"version": "0.6.0",
"description": "Cross platform network utilities for Node.js (gateway_ip, MAC address, etc)",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

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