systeminformation 5.30.4 → 5.30.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/network.js +11 -18
- package/package.json +1 -1
package/lib/network.js
CHANGED
|
@@ -281,7 +281,7 @@ function getWindowsNics() {
|
|
|
281
281
|
function getWindowsDNSsuffixes() {
|
|
282
282
|
let iface = {};
|
|
283
283
|
|
|
284
|
-
|
|
284
|
+
const dnsSuffixes = {
|
|
285
285
|
primaryDNS: '',
|
|
286
286
|
exitCode: 0,
|
|
287
287
|
ifaces: []
|
|
@@ -374,7 +374,7 @@ function getWindowsWirelessIfaceSSID(interfaceName) {
|
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
376
|
function getWindowsIEEE8021x(connectionType, iface, ifaces) {
|
|
377
|
-
|
|
377
|
+
const i8021x = {
|
|
378
378
|
state: 'Unknown',
|
|
379
379
|
protocol: 'Unknown'
|
|
380
380
|
};
|
|
@@ -947,7 +947,7 @@ function networkInterfaces(callback, rescan, defaultString) {
|
|
|
947
947
|
ip6 = ip6link;
|
|
948
948
|
ip6subnet = ip6linksubnet;
|
|
949
949
|
}
|
|
950
|
-
const iface = dev.split(':')[0].trim()
|
|
950
|
+
const iface = dev.split(':')[0].trim();
|
|
951
951
|
let ifaceSanitized = '';
|
|
952
952
|
const s = util.isPrototypePolluted() ? '---' : util.sanitizeShellString(iface);
|
|
953
953
|
const l = util.mathMin(s.length, 2000);
|
|
@@ -1290,7 +1290,7 @@ function networkStats(ifaces, callback) {
|
|
|
1290
1290
|
Object.setPrototypeOf(ifaces, util.stringObj);
|
|
1291
1291
|
}
|
|
1292
1292
|
|
|
1293
|
-
ifaces = ifaces.trim().
|
|
1293
|
+
ifaces = ifaces.trim().replace(/,+/g, '|');
|
|
1294
1294
|
ifacesArray = ifaces.split('|');
|
|
1295
1295
|
}
|
|
1296
1296
|
|
|
@@ -1334,11 +1334,11 @@ function networkStats(ifaces, callback) {
|
|
|
1334
1334
|
|
|
1335
1335
|
function networkStatsSingle(iface) {
|
|
1336
1336
|
function parseLinesWindowsPerfData(sections) {
|
|
1337
|
-
|
|
1337
|
+
const perfData = [];
|
|
1338
1338
|
for (let i in sections) {
|
|
1339
1339
|
if ({}.hasOwnProperty.call(sections, i)) {
|
|
1340
1340
|
if (sections[i].trim() !== '') {
|
|
1341
|
-
|
|
1341
|
+
const lines = sections[i].trim().split('\r\n');
|
|
1342
1342
|
perfData.push({
|
|
1343
1343
|
name: util
|
|
1344
1344
|
.getValue(lines, 'Name', ':')
|
|
@@ -1595,7 +1595,7 @@ function getProcessName(processes, pid) {
|
|
|
1595
1595
|
function networkConnections(callback) {
|
|
1596
1596
|
return new Promise((resolve) => {
|
|
1597
1597
|
process.nextTick(() => {
|
|
1598
|
-
|
|
1598
|
+
const result = [];
|
|
1599
1599
|
if (_linux || _freebsd || _openbsd || _netbsd) {
|
|
1600
1600
|
let cmd =
|
|
1601
1601
|
'export LC_ALL=C; netstat -tunap | grep "ESTABLISHED\\|SYN_SENT\\|SYN_RECV\\|FIN_WAIT1\\|FIN_WAIT2\\|TIME_WAIT\\|CLOSE\\|CLOSE_WAIT\\|LAST_ACK\\|LISTEN\\|CLOSING\\|UNKNOWN"; unset LC_ALL';
|
|
@@ -1689,13 +1689,6 @@ function networkConnections(callback) {
|
|
|
1689
1689
|
}
|
|
1690
1690
|
}
|
|
1691
1691
|
}
|
|
1692
|
-
// if (line.length >= 7 && line[6].indexOf('users:') > -1) {
|
|
1693
|
-
// const proc = line[6].replace('users:(("', '').replace(/"/g, '').split(',');
|
|
1694
|
-
// if (proc.length > 2) {
|
|
1695
|
-
// process = proc[0].split(' ')[0].split(':')[0];
|
|
1696
|
-
// pid = parseInt(proc[1], 10);
|
|
1697
|
-
// }
|
|
1698
|
-
// }
|
|
1699
1692
|
if (connstate) {
|
|
1700
1693
|
result.push({
|
|
1701
1694
|
protocol: line[0],
|
|
@@ -1806,7 +1799,7 @@ function networkConnections(callback) {
|
|
|
1806
1799
|
if (line.length >= 4) {
|
|
1807
1800
|
let localip = line[1];
|
|
1808
1801
|
let localport = '';
|
|
1809
|
-
|
|
1802
|
+
const localaddress = line[1].split(':');
|
|
1810
1803
|
if (localaddress.length > 1) {
|
|
1811
1804
|
localport = localaddress[localaddress.length - 1];
|
|
1812
1805
|
localaddress.pop();
|
|
@@ -1815,14 +1808,14 @@ function networkConnections(callback) {
|
|
|
1815
1808
|
localip = localip.replace(/\[/g, '').replace(/\]/g, '');
|
|
1816
1809
|
let peerip = line[2];
|
|
1817
1810
|
let peerport = '';
|
|
1818
|
-
|
|
1811
|
+
const peeraddress = line[2].split(':');
|
|
1819
1812
|
if (peeraddress.length > 1) {
|
|
1820
1813
|
peerport = peeraddress[peeraddress.length - 1];
|
|
1821
1814
|
peeraddress.pop();
|
|
1822
1815
|
peerip = peeraddress.join(':');
|
|
1823
1816
|
}
|
|
1824
1817
|
peerip = peerip.replace(/\[/g, '').replace(/\]/g, '');
|
|
1825
|
-
|
|
1818
|
+
const pid = util.toInt(line[4]);
|
|
1826
1819
|
let connstate = line[3];
|
|
1827
1820
|
if (connstate === 'HERGESTELLT') {
|
|
1828
1821
|
connstate = 'ESTABLISHED';
|
|
@@ -1901,7 +1894,7 @@ function networkGatewayDefault(callback) {
|
|
|
1901
1894
|
process.nextTick(() => {
|
|
1902
1895
|
let result = '';
|
|
1903
1896
|
if (_linux || _freebsd || _openbsd || _netbsd) {
|
|
1904
|
-
|
|
1897
|
+
const cmd = 'ip route get 1';
|
|
1905
1898
|
try {
|
|
1906
1899
|
exec(cmd, { maxBuffer: 1024 * 102400 }, (error, stdout) => {
|
|
1907
1900
|
if (!error) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "systeminformation",
|
|
3
|
-
"version": "5.30.
|
|
3
|
+
"version": "5.30.5",
|
|
4
4
|
"description": "Advanced, lightweight system and OS information library",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Sebastian Hildebrandt <hildebrandt@plus-innovations.com> (https://plus-innovations.com)",
|