From 453d338a93ed7d7d0f0cf0dc5a395674b43c03fe Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Fri, 24 Nov 2023 13:12:40 +0100 Subject: [PATCH] networkConnections() fix truncated ip6 addr (macOS) --- CHANGELOG.md | 3 ++- docs/history.html | 5 +++++ docs/index.html | 10 +++++----- docs/v4/index.html | 8 ++++---- lib/network.js | 2 +- 5 files changed, 17 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9937e680..bf46b5cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -83,7 +83,8 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | -| 5.21.17 | 2023-11-09 | `system()` Raspberry Pi 5 name fix | +| 5.21.18 | 2023-11-24 | `networkConnections()` fix truncated ip6 addr (macOS) | +| 5.21.17 | 2023-11-11 | `system()` Raspberry Pi 5 name fix | | 5.21.16 | 2023-11-09 | `currentLoad()` improved parsing (linux) | | 5.21.15 | 2023-10-27 | `wifiConnections()` improved parsing (linux) | | 5.21.14 | 2023-10-26 | `execSync()` added explicit encoding (linux) | diff --git a/docs/history.html b/docs/history.html index 7f037e59..f118d892 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@

Full version history

+ + 5.21.18 + 2023-11-24 + networkConnections() fix truncated ip6 addr (macOS) + 5.21.17 2023-11-11 diff --git a/docs/index.html b/docs/index.html index 0a37cf4f..18f07af9 100644 --- a/docs/index.html +++ b/docs/index.html @@ -64,8 +64,8 @@ var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function () { if (this.readyState == 4 && this.status == 200) { - var package = JSON.parse(this.responseText); - document.getElementById("version").innerHTML = package.version; + var packageVersion = JSON.parse(this.responseText); + document.getElementById("version").innerHTML = packageVersion.version; } }; xhttp.open("GET", "https://registry.npmjs.org/systeminformation/latest", true); @@ -79,9 +79,9 @@ backDelay: 1200, }; - var typed = new Typed('#typed', options); + return new Typed('#typed', options); } - function scrollIt(destination, duration = 200, easing = 'linear', callback) { + function scrollIt(destination, duration, easing, callback) { const easings = { linear(t) { @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.21.17
+
New Version: 5.21.18
diff --git a/docs/v4/index.html b/docs/v4/index.html index 2607a0f8..d744b913 100644 --- a/docs/v4/index.html +++ b/docs/v4/index.html @@ -63,8 +63,8 @@ var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function () { if (this.readyState == 4 && this.status == 200) { - var package = JSON.parse(this.responseText); - document.getElementById("version").innerHTML = package.version; + var packageVersion = JSON.parse(this.responseText); + document.getElementById("version").innerHTML = packageVersion.version; } }; xhttp.open("GET", "https://registry.npmjs.org/systeminformation/latest", true); @@ -78,9 +78,9 @@ backDelay: 1200, }; - var typed = new Typed('#typed', options); + return new Typed('#typed', options); } - function scrollIt(destination, duration = 200, easing = 'linear', callback) { + function scrollIt(destination, duration, easing, callback) { const easings = { linear(t) { diff --git a/lib/network.js b/lib/network.js index 61d10cdb..fc892063 100644 --- a/lib/network.js +++ b/lib/network.js @@ -1525,7 +1525,7 @@ function networkConnections(callback) { } if (_darwin) { // let cmd = 'netstat -natv | grep "ESTABLISHED\\|SYN_SENT\\|SYN_RECV\\|FIN_WAIT1\\|FIN_WAIT2\\|TIME_WAIT\\|CLOSE\\|CLOSE_WAIT\\|LAST_ACK\\|LISTEN\\|CLOSING\\|UNKNOWN"'; - let cmd = 'netstat -natv | grep "tcp4\\|tcp6\\|udp4\\|udp6"'; + let cmd = 'netstat -natvln | grep "tcp4\\|tcp6\\|udp4\\|udp6"'; const states = 'ESTABLISHED|SYN_SENT|SYN_RECV|FIN_WAIT1|FIN_WAIT2|TIME_WAIT|CLOSE|CLOSE_WAIT|LAST_ACK|LISTEN|CLOSING|UNKNOWN'; exec(cmd, { maxBuffer: 1024 * 20000 }, function (error, stdout) { if (!error) {