systeminformation 5.31.14 → 5.31.15
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/filesystem.js +2 -2
- package/lib/network.js +1 -1
- package/lib/wifi.js +2 -2
- package/package.json +1 -1
package/lib/filesystem.js
CHANGED
|
@@ -214,7 +214,7 @@ function fsSize(drive, callback) {
|
|
|
214
214
|
}
|
|
215
215
|
if (_windows) {
|
|
216
216
|
try {
|
|
217
|
-
const driveSanitized = drive ? util.
|
|
217
|
+
const driveSanitized = drive ? util.sanitizeString(drive, true) : '';
|
|
218
218
|
const cmd = `Get-WmiObject Win32_logicaldisk | select Access,Caption,FileSystem,FreeSpace,Size ${driveSanitized ? '| where -property Caption -eq ' + driveSanitized : ''} | fl`;
|
|
219
219
|
util.powerShell(cmd).then((stdout, error) => {
|
|
220
220
|
if (!error) {
|
|
@@ -484,7 +484,7 @@ function raidMatchLinux(data) {
|
|
|
484
484
|
try {
|
|
485
485
|
data.forEach((element) => {
|
|
486
486
|
if (element.type.startsWith('raid')) {
|
|
487
|
-
const lines = execSync(`mdadm --export --detail /dev/${element.name}`, util.execOptsLinux).toString().split('\n');
|
|
487
|
+
const lines = execSync(`mdadm --export --detail /dev/${util.sanitizeString(element.name, true)}`, util.execOptsLinux).toString().split('\n');
|
|
488
488
|
const mdData = decodeMdabmData(lines);
|
|
489
489
|
|
|
490
490
|
element.label = mdData.label; // <- assign label info
|
package/lib/network.js
CHANGED
|
@@ -1337,7 +1337,7 @@ function networkStatsSingle(iface) {
|
|
|
1337
1337
|
|
|
1338
1338
|
return new Promise((resolve) => {
|
|
1339
1339
|
process.nextTick(() => {
|
|
1340
|
-
const ifaceSanitized = util.sanitizeString(iface);
|
|
1340
|
+
const ifaceSanitized = util.sanitizeString(iface, true);
|
|
1341
1341
|
|
|
1342
1342
|
let result = {
|
|
1343
1343
|
iface: ifaceSanitized,
|
package/lib/wifi.js
CHANGED
|
@@ -229,7 +229,7 @@ function wpaConnectionLinux(iface) {
|
|
|
229
229
|
if (!iface) {
|
|
230
230
|
return {};
|
|
231
231
|
}
|
|
232
|
-
const cmd = `wpa_cli -i ${iface} status 2>&1`;
|
|
232
|
+
const cmd = `wpa_cli -i ${util.sanitizeString(iface, true)} status 2>&1`;
|
|
233
233
|
try {
|
|
234
234
|
const lines = execSync(cmd, util.execOptsLinux).toString().split('\n');
|
|
235
235
|
const freq = util.toInt(util.getValue(lines, 'freq', '='));
|
|
@@ -284,7 +284,7 @@ function getWifiNetworkListNmi() {
|
|
|
284
284
|
function getWifiNetworkListIw(iface) {
|
|
285
285
|
const result = [];
|
|
286
286
|
try {
|
|
287
|
-
let iwlistParts = execSync(`export LC_ALL=C; iwlist ${iface} scan 2>&1; unset LC_ALL`, util.execOptsLinux).toString().split(' Cell ');
|
|
287
|
+
let iwlistParts = execSync(`export LC_ALL=C; iwlist ${util.sanitizeString(iface, true)} scan 2>&1; unset LC_ALL`, util.execOptsLinux).toString().split(' Cell ');
|
|
288
288
|
if (iwlistParts[0].indexOf('resource busy') >= 0) {
|
|
289
289
|
return -1;
|
|
290
290
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "systeminformation",
|
|
3
|
-
"version": "5.31.
|
|
3
|
+
"version": "5.31.15",
|
|
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)",
|