@depup/systeminformation 5.31.4-depup.0 → 5.33.1-depup.0
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/README.md +2 -2
- package/changes.json +1 -1
- package/lib/audio.js +6 -5
- package/lib/battery.js +6 -2
- package/lib/bluetooth.js +6 -2
- package/lib/cpu.js +108 -60
- package/lib/docker.js +50 -62
- package/lib/dockerSocket.js +56 -261
- package/lib/filesystem.js +114 -27
- package/lib/graphics.js +175 -89
- package/lib/index.d.ts +6 -8
- package/lib/index.js +4 -2
- package/lib/memory.js +14 -5
- package/lib/network.js +60 -74
- package/lib/osinfo.js +27 -9
- package/lib/printer.js +5 -5
- package/lib/processes.js +49 -15
- package/lib/system.js +3 -4
- package/lib/usb.js +0 -4
- package/lib/util.js +79 -18
- package/lib/virtualbox.js +10 -4
- package/lib/wifi.js +40 -44
- package/package.json +12 -9
package/lib/util.js
CHANGED
|
@@ -201,14 +201,8 @@ function parseTime(t, pmDesignator) {
|
|
|
201
201
|
if (parts[2]) {
|
|
202
202
|
parts[1] += parts[2];
|
|
203
203
|
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
parts[1].toLowerCase().indexOf('p.m.') > -1 ||
|
|
207
|
-
parts[1].toLowerCase().indexOf('p. m.') > -1 ||
|
|
208
|
-
parts[1].toLowerCase().indexOf('n') > -1 ||
|
|
209
|
-
parts[1].toLowerCase().indexOf('ch') > -1 ||
|
|
210
|
-
parts[1].toLowerCase().indexOf('ös') > -1 ||
|
|
211
|
-
(pmDesignator && parts[1].toLowerCase().indexOf(pmDesignator) > -1);
|
|
204
|
+
const p1 = (parts[1] || '').toLowerCase();
|
|
205
|
+
let isPM = p1.indexOf('pm') > -1 || p1.indexOf('p.m.') > -1 || p1.indexOf('p. m.') > -1 || p1.indexOf('n') > -1 || p1.indexOf('ch') > -1 || p1.indexOf('ös') > -1 || (pmDesignator && p1.indexOf(pmDesignator) > -1);
|
|
212
206
|
hour = parseInt(parts[0], 10);
|
|
213
207
|
min = parseInt(parts[1], 10);
|
|
214
208
|
hour = isPM && hour < 12 ? hour + 12 : hour;
|
|
@@ -364,7 +358,8 @@ function getPowershell() {
|
|
|
364
358
|
}
|
|
365
359
|
|
|
366
360
|
function getVboxmanage() {
|
|
367
|
-
|
|
361
|
+
const vboxPath = (process.env.VBOX_INSTALL_PATH || process.env.VBOX_MSI_INSTALL_PATH || '').replace(/["%!^&|<>`$;\r\n]/g, '');
|
|
362
|
+
return _windows ? `"${vboxPath}\\VBoxManage.exe"` : 'vboxmanage';
|
|
368
363
|
}
|
|
369
364
|
|
|
370
365
|
function powerShellProceedResults(data) {
|
|
@@ -621,7 +616,7 @@ function smartMonToolsInstalled() {
|
|
|
621
616
|
const pathArray = execSync('which smartctl 2>/dev/null', execOptsLinux).toString().split('\r\n');
|
|
622
617
|
_smartMonToolsInstalled = pathArray.length > 0;
|
|
623
618
|
} catch {
|
|
624
|
-
|
|
619
|
+
noop();
|
|
625
620
|
}
|
|
626
621
|
}
|
|
627
622
|
return _smartMonToolsInstalled;
|
|
@@ -734,6 +729,9 @@ function sanitizeShellString(str, strict) {
|
|
|
734
729
|
s[i] === '&' ||
|
|
735
730
|
s[i] === ']' ||
|
|
736
731
|
s[i] === '#' ||
|
|
732
|
+
s[i] === '%' ||
|
|
733
|
+
s[i] === '!' ||
|
|
734
|
+
s[i] === '^' ||
|
|
737
735
|
s[i] === '\\' ||
|
|
738
736
|
s[i] === '\t' ||
|
|
739
737
|
s[i] === '\n' ||
|
|
@@ -757,6 +755,20 @@ function sanitizeShellString(str, strict) {
|
|
|
757
755
|
return result;
|
|
758
756
|
}
|
|
759
757
|
|
|
758
|
+
function sanitizeContainerID(str) {
|
|
759
|
+
const s = String(str || '')
|
|
760
|
+
.substring(0, 2000)
|
|
761
|
+
.replace(/[^a-zA-Z0-9_.,*-]/g, '');
|
|
762
|
+
return s.indexOf('..') === -1 ? s : '';
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
function sanitizeImageID(str) {
|
|
766
|
+
const s = String(str || '')
|
|
767
|
+
.substring(0, 2000)
|
|
768
|
+
.replace(/[^a-zA-Z0-9_.,:@/-]/g, '');
|
|
769
|
+
return s.indexOf('..') === -1 ? s : '';
|
|
770
|
+
}
|
|
771
|
+
|
|
760
772
|
function isPrototypePolluted() {
|
|
761
773
|
const s = '1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
|
762
774
|
let notPolluted = true;
|
|
@@ -830,6 +842,22 @@ function isPrototypePolluted() {
|
|
|
830
842
|
return !notPolluted;
|
|
831
843
|
}
|
|
832
844
|
|
|
845
|
+
function sanitizeString(str, strict) {
|
|
846
|
+
if (typeof strict === 'undefined') {
|
|
847
|
+
strict = false;
|
|
848
|
+
}
|
|
849
|
+
let result = '';
|
|
850
|
+
const s = isPrototypePolluted() ? '---' : sanitizeShellString(str, strict);
|
|
851
|
+
const l = mathMin(s.length, 2000);
|
|
852
|
+
|
|
853
|
+
for (let i = 0; i <= l; i++) {
|
|
854
|
+
if (s[i] !== undefined) {
|
|
855
|
+
result = result + s[i];
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
return result;
|
|
859
|
+
}
|
|
860
|
+
|
|
833
861
|
function hex2bin(hex) {
|
|
834
862
|
return ('00000000' + parseInt(hex, 16).toString(2)).substr(-8);
|
|
835
863
|
}
|
|
@@ -1149,7 +1177,7 @@ function promiseAll(promises) {
|
|
|
1149
1177
|
}
|
|
1150
1178
|
|
|
1151
1179
|
function promisify(nodeStyleFunction) {
|
|
1152
|
-
return ()
|
|
1180
|
+
return function () {
|
|
1153
1181
|
const args = Array.prototype.slice.call(arguments);
|
|
1154
1182
|
return new Promise((resolve, reject) => {
|
|
1155
1183
|
args.push((err, data) => {
|
|
@@ -1165,7 +1193,7 @@ function promisify(nodeStyleFunction) {
|
|
|
1165
1193
|
}
|
|
1166
1194
|
|
|
1167
1195
|
function promisifySave(nodeStyleFunction) {
|
|
1168
|
-
return ()
|
|
1196
|
+
return function () {
|
|
1169
1197
|
const args = Array.prototype.slice.call(arguments);
|
|
1170
1198
|
return new Promise((resolve) => {
|
|
1171
1199
|
args.push((err, data) => {
|
|
@@ -1269,7 +1297,7 @@ function plistParser(xmlStr) {
|
|
|
1269
1297
|
if (depth > 1 && metaData[depth - 2].tagStart === 'array') {
|
|
1270
1298
|
metaData[depth - 2].data.push(metaData[depth - 1].data);
|
|
1271
1299
|
}
|
|
1272
|
-
if (depth > 1 && metaData[depth - 2].tagStart === 'dict') {
|
|
1300
|
+
if (depth > 1 && metaData[depth - 2].tagStart === 'dict' && !isProtoKey(metaData[depth - 1].key)) {
|
|
1273
1301
|
metaData[depth - 2].data[metaData[depth - 1].key] = metaData[depth - 1].data;
|
|
1274
1302
|
}
|
|
1275
1303
|
depth--;
|
|
@@ -1299,7 +1327,7 @@ function plistParser(xmlStr) {
|
|
|
1299
1327
|
if (depth > 0 && metaData[depth - 1].tagStart === 'array') {
|
|
1300
1328
|
metaData[depth - 1].data.push(metaData[depth].data);
|
|
1301
1329
|
}
|
|
1302
|
-
if (depth > 0 && metaData[depth - 1].tagStart === 'dict') {
|
|
1330
|
+
if (depth > 0 && metaData[depth - 1].tagStart === 'dict' && !isProtoKey(metaData[depth].key)) {
|
|
1303
1331
|
metaData[depth - 1].data[metaData[depth].key] = metaData[depth].data;
|
|
1304
1332
|
}
|
|
1305
1333
|
}
|
|
@@ -1373,8 +1401,8 @@ function plistReader(output) {
|
|
|
1373
1401
|
|
|
1374
1402
|
function semverCompare(v1, v2) {
|
|
1375
1403
|
let res = 0;
|
|
1376
|
-
const parts1 = v1.split('.');
|
|
1377
|
-
const parts2 = v2.split('.');
|
|
1404
|
+
const parts1 = v1.split('.').map((p) => parseInt(p, 10) || 0);
|
|
1405
|
+
const parts2 = v2.split('.').map((p) => parseInt(p, 10) || 0);
|
|
1378
1406
|
if (parts1[0] < parts2[0]) {
|
|
1379
1407
|
res = 1;
|
|
1380
1408
|
} else if (parts1[0] > parts2[0]) {
|
|
@@ -1402,9 +1430,25 @@ function semverCompare(v1, v2) {
|
|
|
1402
1430
|
function getAppleModel(key) {
|
|
1403
1431
|
const appleModelIds = [
|
|
1404
1432
|
{
|
|
1405
|
-
key: 'Mac17,
|
|
1433
|
+
key: 'Mac17,9',
|
|
1434
|
+
name: 'MacBook Pro',
|
|
1435
|
+
size: '14-inch',
|
|
1436
|
+
processor: 'M5 Pro',
|
|
1437
|
+
year: '2026',
|
|
1438
|
+
additional: ''
|
|
1439
|
+
},
|
|
1440
|
+
{
|
|
1441
|
+
key: 'Mac17,8',
|
|
1406
1442
|
name: 'MacBook Pro',
|
|
1407
1443
|
size: '16-inch',
|
|
1444
|
+
processor: 'M5 Pro',
|
|
1445
|
+
year: '2026',
|
|
1446
|
+
additional: ''
|
|
1447
|
+
},
|
|
1448
|
+
{
|
|
1449
|
+
key: 'Mac17,7',
|
|
1450
|
+
name: 'MacBook Pro',
|
|
1451
|
+
size: '14-inch',
|
|
1408
1452
|
processor: 'M5 Max',
|
|
1409
1453
|
year: '2026',
|
|
1410
1454
|
additional: ''
|
|
@@ -1412,7 +1456,7 @@ function getAppleModel(key) {
|
|
|
1412
1456
|
{
|
|
1413
1457
|
key: 'Mac17,6',
|
|
1414
1458
|
name: 'MacBook Pro',
|
|
1415
|
-
size: '
|
|
1459
|
+
size: '16-inch',
|
|
1416
1460
|
processor: 'M5 Max',
|
|
1417
1461
|
year: '2026',
|
|
1418
1462
|
additional: ''
|
|
@@ -2702,8 +2746,21 @@ function checkWebsite(url, timeout = 5000) {
|
|
|
2702
2746
|
function cleanString(str) {
|
|
2703
2747
|
return str.replace(/To Be Filled By O.E.M./g, '');
|
|
2704
2748
|
}
|
|
2749
|
+
|
|
2750
|
+
function grep(str, pattern) {
|
|
2751
|
+
const result = str
|
|
2752
|
+
.split('\n')
|
|
2753
|
+
.filter((line) => line.includes(pattern))
|
|
2754
|
+
.join('\n');
|
|
2755
|
+
return result;
|
|
2756
|
+
}
|
|
2757
|
+
|
|
2705
2758
|
function noop() {}
|
|
2706
2759
|
|
|
2760
|
+
function isProtoKey(key) {
|
|
2761
|
+
return key === '__proto__' || key === 'constructor' || key === 'prototype';
|
|
2762
|
+
}
|
|
2763
|
+
|
|
2707
2764
|
exports.toInt = toInt;
|
|
2708
2765
|
exports.splitByNumber = splitByNumber;
|
|
2709
2766
|
exports.execOptsWin = execOptsWin;
|
|
@@ -2732,7 +2789,10 @@ exports.noop = noop;
|
|
|
2732
2789
|
exports.isRaspberry = isRaspberry;
|
|
2733
2790
|
exports.isRaspbian = isRaspbian;
|
|
2734
2791
|
exports.sanitizeShellString = sanitizeShellString;
|
|
2792
|
+
exports.sanitizeContainerID = sanitizeContainerID;
|
|
2793
|
+
exports.sanitizeImageID = sanitizeImageID;
|
|
2735
2794
|
exports.isPrototypePolluted = isPrototypePolluted;
|
|
2795
|
+
exports.sanitizeString = sanitizeString;
|
|
2736
2796
|
exports.decodePiCpuinfo = decodePiCpuinfo;
|
|
2737
2797
|
exports.getRpiGpu = getRpiGpu;
|
|
2738
2798
|
exports.promiseAll = promiseAll;
|
|
@@ -2757,4 +2817,5 @@ exports.semverCompare = semverCompare;
|
|
|
2757
2817
|
exports.getAppleModel = getAppleModel;
|
|
2758
2818
|
exports.checkWebsite = checkWebsite;
|
|
2759
2819
|
exports.cleanString = cleanString;
|
|
2820
|
+
exports.grep = grep;
|
|
2760
2821
|
exports.getPowershell = getPowershell;
|
package/lib/virtualbox.js
CHANGED
|
@@ -35,8 +35,11 @@ function vboxInfo(callback) {
|
|
|
35
35
|
try {
|
|
36
36
|
if (running) {
|
|
37
37
|
const sinceDateObj = new Date(runningSinceString);
|
|
38
|
-
const
|
|
39
|
-
|
|
38
|
+
const parsed = Date.parse(sinceDateObj);
|
|
39
|
+
if (!isNaN(parsed)) {
|
|
40
|
+
const offset = sinceDateObj.getTimezoneOffset();
|
|
41
|
+
runningSince = Math.round((Date.now() - parsed) / 1000) + offset * 60;
|
|
42
|
+
}
|
|
40
43
|
}
|
|
41
44
|
} catch {
|
|
42
45
|
util.noop();
|
|
@@ -46,8 +49,11 @@ function vboxInfo(callback) {
|
|
|
46
49
|
try {
|
|
47
50
|
if (!running) {
|
|
48
51
|
const sinceDateObj = new Date(stoppedSinceString);
|
|
49
|
-
const
|
|
50
|
-
|
|
52
|
+
const parsed = Date.parse(sinceDateObj);
|
|
53
|
+
if (!isNaN(parsed)) {
|
|
54
|
+
const offset = sinceDateObj.getTimezoneOffset();
|
|
55
|
+
stoppedSince = Math.round((Date.now() - parsed) / 1000) + offset * 60;
|
|
56
|
+
}
|
|
51
57
|
}
|
|
52
58
|
} catch {
|
|
53
59
|
util.noop();
|
package/lib/wifi.js
CHANGED
|
@@ -18,7 +18,7 @@ const exec = require('child_process').exec;
|
|
|
18
18
|
const execSync = require('child_process').execSync;
|
|
19
19
|
const util = require('./util');
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
const _platform = process.platform;
|
|
22
22
|
|
|
23
23
|
const _linux = _platform === 'linux' || _platform === 'android';
|
|
24
24
|
const _darwin = _platform === 'darwin';
|
|
@@ -26,6 +26,9 @@ const _windows = _platform === 'win32';
|
|
|
26
26
|
|
|
27
27
|
function wifiDBFromQuality(quality) {
|
|
28
28
|
const qual = parseFloat(quality);
|
|
29
|
+
if (isNaN(qual)) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
29
32
|
if (qual < 0) {
|
|
30
33
|
return 0;
|
|
31
34
|
}
|
|
@@ -36,7 +39,11 @@ function wifiDBFromQuality(quality) {
|
|
|
36
39
|
}
|
|
37
40
|
|
|
38
41
|
function wifiQualityFromDB(db) {
|
|
39
|
-
const
|
|
42
|
+
const dbValue = parseFloat(db);
|
|
43
|
+
if (isNaN(dbValue)) {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
const result = 2 * (dbValue + 100);
|
|
40
47
|
return result <= 100 ? result : 100;
|
|
41
48
|
}
|
|
42
49
|
|
|
@@ -122,7 +129,7 @@ function wifiFrequencyFromChannel(channel) {
|
|
|
122
129
|
|
|
123
130
|
function wifiChannelFromFrequencs(frequency) {
|
|
124
131
|
let channel = 0;
|
|
125
|
-
for (
|
|
132
|
+
for (const key in _wifi_frequencies) {
|
|
126
133
|
if ({}.hasOwnProperty.call(_wifi_frequencies, key)) {
|
|
127
134
|
if (_wifi_frequencies[key] === frequency) {
|
|
128
135
|
channel = util.toInt(key);
|
|
@@ -190,26 +197,33 @@ function nmiDeviceLinux(iface) {
|
|
|
190
197
|
try {
|
|
191
198
|
const lines = execSync(cmd, util.execOptsLinux).toString().split('\n');
|
|
192
199
|
const ssid = util.getValue(lines, 'GENERAL.CONNECTION');
|
|
200
|
+
const uuid = util.getValue(lines, 'GENERAL.CON-UUID');
|
|
193
201
|
return {
|
|
194
202
|
iface,
|
|
195
203
|
type: util.getValue(lines, 'GENERAL.TYPE'),
|
|
196
204
|
vendor: util.getValue(lines, 'GENERAL.VENDOR'),
|
|
197
205
|
product: util.getValue(lines, 'GENERAL.PRODUCT'),
|
|
198
206
|
mac: util.getValue(lines, 'GENERAL.HWADDR').toLowerCase(),
|
|
199
|
-
ssid: ssid !== '--' ? ssid : null
|
|
207
|
+
ssid: ssid !== '--' ? ssid : null,
|
|
208
|
+
uuid: uuid !== '--' ? uuid : null
|
|
200
209
|
};
|
|
201
210
|
} catch {
|
|
202
211
|
return {};
|
|
203
212
|
}
|
|
204
213
|
}
|
|
205
214
|
|
|
206
|
-
function nmiConnectionLinux(
|
|
207
|
-
|
|
215
|
+
function nmiConnectionLinux(uuid) {
|
|
216
|
+
// query by connection UUID instead of SSID: profile names may differ from the SSID
|
|
217
|
+
if (!uuid || !/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(uuid)) {
|
|
218
|
+
return {};
|
|
219
|
+
}
|
|
220
|
+
const cmd = `nmcli -t connection show ${uuid} 2>/dev/null`;
|
|
208
221
|
try {
|
|
209
222
|
const lines = execSync(cmd, util.execOptsLinux).toString().split('\n');
|
|
223
|
+
const ssid = util.getValue(lines, '802-11-wireless.ssid');
|
|
210
224
|
const bssid = util.getValue(lines, '802-11-wireless.seen-bssids').toLowerCase();
|
|
211
225
|
return {
|
|
212
|
-
ssid: ssid
|
|
226
|
+
ssid: ssid || null,
|
|
213
227
|
uuid: util.getValue(lines, 'connection.uuid'),
|
|
214
228
|
type: util.getValue(lines, 'connection.type'),
|
|
215
229
|
autoconnect: util.getValue(lines, 'connection.autoconnect') === 'yes',
|
|
@@ -225,7 +239,7 @@ function wpaConnectionLinux(iface) {
|
|
|
225
239
|
if (!iface) {
|
|
226
240
|
return {};
|
|
227
241
|
}
|
|
228
|
-
const cmd = `wpa_cli -i ${iface} status 2>&1`;
|
|
242
|
+
const cmd = `wpa_cli -i ${util.sanitizeString(iface, true)} status 2>&1`;
|
|
229
243
|
try {
|
|
230
244
|
const lines = execSync(cmd, util.execOptsLinux).toString().split('\n');
|
|
231
245
|
const freq = util.toInt(util.getValue(lines, 'freq', '='));
|
|
@@ -280,7 +294,9 @@ function getWifiNetworkListNmi() {
|
|
|
280
294
|
function getWifiNetworkListIw(iface) {
|
|
281
295
|
const result = [];
|
|
282
296
|
try {
|
|
283
|
-
|
|
297
|
+
const iwlistParts = execSync(`export LC_ALL=C; iwlist ${util.sanitizeString(iface, true)} scan 2>&1; unset LC_ALL`, util.execOptsLinux)
|
|
298
|
+
.toString()
|
|
299
|
+
.split(' Cell ');
|
|
284
300
|
if (iwlistParts[0].indexOf('resource busy') >= 0) {
|
|
285
301
|
return -1;
|
|
286
302
|
}
|
|
@@ -324,11 +340,11 @@ function getWifiNetworkListIw(iface) {
|
|
|
324
340
|
if (l.indexOf('pairwise cipher') >= 0) {
|
|
325
341
|
const parts = l.split(':');
|
|
326
342
|
if (parts.length > 1) {
|
|
327
|
-
if (parts[1].indexOf('tkip')) {
|
|
343
|
+
if (parts[1].indexOf('tkip') >= 0) {
|
|
328
344
|
wpaFlag = wpaFlag ? 'TKIP/' + wpaFlag : 'TKIP';
|
|
329
|
-
} else if (parts[1].indexOf('ccmp')) {
|
|
345
|
+
} else if (parts[1].indexOf('ccmp') >= 0) {
|
|
330
346
|
wpaFlag = wpaFlag ? 'CCMP/' + wpaFlag : 'CCMP';
|
|
331
|
-
} else if (parts[1].indexOf('proprietary')) {
|
|
347
|
+
} else if (parts[1].indexOf('proprietary') >= 0) {
|
|
332
348
|
wpaFlag = wpaFlag ? 'PROP/' + wpaFlag : 'PROP';
|
|
333
349
|
}
|
|
334
350
|
}
|
|
@@ -336,9 +352,9 @@ function getWifiNetworkListIw(iface) {
|
|
|
336
352
|
if (l.indexOf('authentication suites') >= 0) {
|
|
337
353
|
const parts = l.split(':');
|
|
338
354
|
if (parts.length > 1) {
|
|
339
|
-
if (parts[1].indexOf('802.1x')) {
|
|
355
|
+
if (parts[1].indexOf('802.1x') >= 0) {
|
|
340
356
|
wpaFlag = wpaFlag ? '802.1x/' + wpaFlag : '802.1x';
|
|
341
|
-
} else if (parts[1].indexOf('psk')) {
|
|
357
|
+
} else if (parts[1].indexOf('psk') >= 0) {
|
|
342
358
|
wpaFlag = wpaFlag ? 'PSK/' + wpaFlag : 'PSK';
|
|
343
359
|
}
|
|
344
360
|
}
|
|
@@ -424,15 +440,7 @@ function wifiNetworks(callback) {
|
|
|
424
440
|
}
|
|
425
441
|
});
|
|
426
442
|
if (iface) {
|
|
427
|
-
|
|
428
|
-
const s = util.isPrototypePolluted() ? '---' : util.sanitizeShellString(iface, true);
|
|
429
|
-
const l = util.mathMin(s.length, 2000);
|
|
430
|
-
|
|
431
|
-
for (let i = 0; i <= l; i++) {
|
|
432
|
-
if (s[i] !== undefined) {
|
|
433
|
-
ifaceSanitized = ifaceSanitized + s[i];
|
|
434
|
-
}
|
|
435
|
-
}
|
|
443
|
+
const ifaceSanitized = util.sanitizeString(iface, true);
|
|
436
444
|
|
|
437
445
|
const res = getWifiNetworkListIw(ifaceSanitized);
|
|
438
446
|
if (res === -1) {
|
|
@@ -495,6 +503,9 @@ function wifiNetworks(callback) {
|
|
|
495
503
|
|
|
496
504
|
bssidsParts.forEach((bssidPart) => {
|
|
497
505
|
const bssidLines = bssidPart.split(os.EOL);
|
|
506
|
+
if (bssidLines.length < 4) {
|
|
507
|
+
return;
|
|
508
|
+
}
|
|
498
509
|
const bssidLine = bssidLines[0].split(':');
|
|
499
510
|
bssidLine.shift();
|
|
500
511
|
const bssid = bssidLine.join(':').trim().toLowerCase();
|
|
@@ -585,30 +596,13 @@ function wifiConnections(callback) {
|
|
|
585
596
|
const ifaces = ifaceListLinux();
|
|
586
597
|
const networkList = getWifiNetworkListNmi();
|
|
587
598
|
ifaces.forEach((ifaceDetail) => {
|
|
588
|
-
|
|
589
|
-
const s = util.isPrototypePolluted() ? '---' : util.sanitizeShellString(ifaceDetail.iface, true);
|
|
590
|
-
const ll = util.mathMin(s.length, 2000);
|
|
591
|
-
|
|
592
|
-
for (let i = 0; i <= ll; i++) {
|
|
593
|
-
if (s[i] !== undefined) {
|
|
594
|
-
ifaceSanitized = ifaceSanitized + s[i];
|
|
595
|
-
}
|
|
596
|
-
}
|
|
599
|
+
const ifaceSanitized = util.sanitizeString(ifaceDetail.iface, true);
|
|
597
600
|
|
|
598
601
|
const nmiDetails = nmiDeviceLinux(ifaceSanitized);
|
|
599
602
|
const wpaDetails = wpaConnectionLinux(ifaceSanitized);
|
|
600
|
-
const
|
|
603
|
+
const nmiConnection = nmiConnectionLinux(nmiDetails.uuid);
|
|
604
|
+
const ssid = nmiConnection.ssid || nmiDetails.ssid || wpaDetails.ssid;
|
|
601
605
|
const network = networkList.filter((nw) => nw.ssid === ssid);
|
|
602
|
-
let ssidSanitized = '';
|
|
603
|
-
const t = util.isPrototypePolluted() ? '---' : util.sanitizeShellString(ssid, true);
|
|
604
|
-
const l = util.mathMin(t.length, 32);
|
|
605
|
-
for (let i = 0; i <= l; i++) {
|
|
606
|
-
if (t[i] !== undefined) {
|
|
607
|
-
ssidSanitized = ssidSanitized + t[i];
|
|
608
|
-
}
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
const nmiConnection = nmiConnectionLinux(ssidSanitized);
|
|
612
606
|
const channel = network && network.length && network[0].channel ? network[0].channel : wpaDetails.channel ? wpaDetails.channel : null;
|
|
613
607
|
const bssid = network && network.length && network[0].bssid ? network[0].bssid : wpaDetails.bssid ? wpaDetails.bssid : null;
|
|
614
608
|
const signalLevel = network && network.length && network[0].signalLevel ? network[0].signalLevel : null;
|
|
@@ -760,7 +754,9 @@ function wifiInterfaces(callback) {
|
|
|
760
754
|
if (_linux) {
|
|
761
755
|
const ifaces = ifaceListLinux();
|
|
762
756
|
ifaces.forEach((ifaceDetail) => {
|
|
763
|
-
const
|
|
757
|
+
const ifaceSanitized = util.sanitizeString(ifaceDetail.iface, true);
|
|
758
|
+
|
|
759
|
+
const nmiDetails = nmiDeviceLinux(ifaceSanitized);
|
|
764
760
|
result.push({
|
|
765
761
|
id: ifaceDetail.id,
|
|
766
762
|
iface: ifaceDetail.iface,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depup/systeminformation",
|
|
3
|
-
"version": "5.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "5.33.1-depup.0",
|
|
4
|
+
"description": "Advanced, lightweight system and OS information library (with updated dependencies)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Sebastian Hildebrandt <hildebrandt@plus-innovations.com> (https://plus-innovations.com)",
|
|
7
7
|
"homepage": "https://systeminformation.io",
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
"types": "./lib/index.d.ts",
|
|
14
14
|
"scripts": {
|
|
15
15
|
"test": "node ./test/test.js",
|
|
16
|
-
"testDeno": "deno run -A ./test/test.js"
|
|
16
|
+
"testDeno": "deno run -A ./test/test.js",
|
|
17
|
+
"testAll": "node ./test/testAll.js"
|
|
17
18
|
},
|
|
18
19
|
"files": [
|
|
19
20
|
"lib/",
|
|
@@ -21,10 +22,12 @@
|
|
|
21
22
|
"README.md"
|
|
22
23
|
],
|
|
23
24
|
"keywords": [
|
|
24
|
-
"depup",
|
|
25
|
-
"dependency-bumped",
|
|
26
|
-
"updated-deps",
|
|
27
25
|
"systeminformation",
|
|
26
|
+
"depup",
|
|
27
|
+
"updated-dependencies",
|
|
28
|
+
"security",
|
|
29
|
+
"latest",
|
|
30
|
+
"patched",
|
|
28
31
|
"system information",
|
|
29
32
|
"sysinfo",
|
|
30
33
|
"monitor",
|
|
@@ -102,14 +105,14 @@
|
|
|
102
105
|
"android"
|
|
103
106
|
],
|
|
104
107
|
"engines": {
|
|
105
|
-
"node": ">=
|
|
108
|
+
"node": ">=10.0.0"
|
|
106
109
|
},
|
|
107
110
|
"depup": {
|
|
108
111
|
"changes": {},
|
|
109
112
|
"depsUpdated": 0,
|
|
110
113
|
"originalPackage": "systeminformation",
|
|
111
|
-
"originalVersion": "5.
|
|
112
|
-
"processedAt": "2026-
|
|
114
|
+
"originalVersion": "5.33.1",
|
|
115
|
+
"processedAt": "2026-07-26T00:59:23.435Z",
|
|
113
116
|
"smokeTest": "passed"
|
|
114
117
|
}
|
|
115
118
|
}
|