Socket
Socket
Sign inDemoInstall

default-gateway

Package Overview
Dependencies
17
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.3.0 to 2.3.1

2

android.js

@@ -16,3 +16,3 @@ "use strict";

(stdout || "").trim().split("\n").some(line => {
const results = /default via (.+?) dev (.+?)( |$)/.exec(line);
const results = /default via (.+?) dev (.+?)( |$)/.exec(line) || [];
const gateway = results[1];

@@ -19,0 +19,0 @@ const iface = results[2];

@@ -17,5 +17,5 @@ "use strict";

(stdout || "").trim().split("\n").some(line => {
const results = /default( via .+?)?( dev .+?)( |$)/.exec(line);
const gateway = ((results || [])[1] || "").substring(5);
const iface = ((results || [])[2] || "").substring(5);
const results = /default( via .+?)?( dev .+?)( |$)/.exec(line) || [];
const gateway = (results[1] || "").substring(5);
const iface = (results[2] || "").substring(5);
if (gateway && net.isIP(gateway)) { // default via 1.2.3.4 dev en0

@@ -22,0 +22,0 @@ result = {gateway: gateway, interface: (iface ? iface : null)};

{
"name": "default-gateway",
"version": "2.3.0",
"version": "2.3.1",
"description": "Get the default network gateway, cross-platform.",

@@ -5,0 +5,0 @@ "author": "silverwind <me@silverwind.io>",

@@ -20,3 +20,3 @@ "use strict";

(gwTable || "").trim().split("\n").splice(1).some(line => {
const results = line.trim().split(/} +/);
const results = line.trim().split(/} +/) || [];
const gw = results[0];

@@ -23,0 +23,0 @@ const id = results[1];

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc