networkConnections() fix truncated ip6 addr (macOS)

This commit is contained in:
Sebastian Hildebrandt
2023-11-24 13:12:40 +01:00
parent f36b80072f
commit 453d338a93
5 changed files with 17 additions and 11 deletions
+1 -1
View File
@@ -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) {