diff --git a/README.md b/README.md
index 87e9063..8ac6800 100644
--- a/README.md
+++ b/README.md
@@ -24,8 +24,6 @@
[![Git Issues][issues-img]][issues-url]
[![Closed Issues][closed-issues-img]][closed-issues-url]
- [![Code Quality: Javascript][lgtm-badge]][lgtm-badge-url]
- [![Total alerts][lgtm-alerts]][lgtm-alerts-url]
[![Caretaker][caretaker-image]][caretaker-url]
[![Sponsoring][sponsor-badge]][sponsor-url]
[![MIT license][license-img]][license-url]
@@ -1059,11 +1057,6 @@ All other trademarks are the property of their respective owners.
[downloads-image]: https://img.shields.io/npm/dm/systeminformation.svg?style=flat-square
[downloads-url]: https://npmjs.org/package/systeminformation
-[lgtm-badge]: https://img.shields.io/lgtm/grade/javascript/g/sebhildebrandt/systeminformation.svg?style=flat-square
-[lgtm-badge-url]: https://lgtm.com/projects/g/sebhildebrandt/systeminformation/context:javascript
-[lgtm-alerts]: https://img.shields.io/lgtm/alerts/g/sebhildebrandt/systeminformation.svg?style=flat-square
-[lgtm-alerts-url]: https://lgtm.com/projects/g/sebhildebrandt/systeminformation/alerts
-
[sponsor-badge]: https://img.shields.io/badge/-Buy%20me%20a%20coffee-blue?style=flat-square
[sponsor-url]: https://www.buymeacoffee.com/systeminfo
diff --git a/docs/audio.html b/docs/audio.html
index e52e412..3052891 100644
--- a/docs/audio.html
+++ b/docs/audio.html
@@ -20,7 +20,7 @@
-
+
systeminformation
diff --git a/docs/battery.html b/docs/battery.html
index 6fae5c7..a55e97d 100644
--- a/docs/battery.html
+++ b/docs/battery.html
@@ -20,7 +20,7 @@
-
+
systeminformation
diff --git a/docs/bluetooth.html b/docs/bluetooth.html
index 8943a8f..5ea80bb 100644
--- a/docs/bluetooth.html
+++ b/docs/bluetooth.html
@@ -20,7 +20,7 @@
-
+
systeminformation
diff --git a/docs/cpu.html b/docs/cpu.html
index c764461..46f8e3f 100644
--- a/docs/cpu.html
+++ b/docs/cpu.html
@@ -20,7 +20,7 @@
-
+
systeminformation
diff --git a/docs/docker.html b/docs/docker.html
index 267e006..867c04f 100644
--- a/docs/docker.html
+++ b/docs/docker.html
@@ -20,7 +20,7 @@
-
+
systeminformation
diff --git a/docs/filesystem.html b/docs/filesystem.html
index e3c19a3..aa6dc1f 100644
--- a/docs/filesystem.html
+++ b/docs/filesystem.html
@@ -20,7 +20,7 @@
-
+
systeminformation
diff --git a/docs/general.html b/docs/general.html
index ecf4c8f..b54c83e 100644
--- a/docs/general.html
+++ b/docs/general.html
@@ -20,7 +20,7 @@
-
+
systeminformation
diff --git a/docs/gettingstarted.html b/docs/gettingstarted.html
index 14093a3..7b20031 100644
--- a/docs/gettingstarted.html
+++ b/docs/gettingstarted.html
@@ -20,7 +20,7 @@
-
+
systeminformation
diff --git a/docs/graphics.html b/docs/graphics.html
index bd6271e..0ba1309 100644
--- a/docs/graphics.html
+++ b/docs/graphics.html
@@ -20,7 +20,7 @@
-
+
systeminformation
diff --git a/docs/index.html b/docs/index.html
index 964ed7c..adf2072 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -18,7 +18,7 @@
-
+
systeminformation
+
systeminformation
diff --git a/docs/network.html b/docs/network.html
index 258a921..40bd14f 100644
--- a/docs/network.html
+++ b/docs/network.html
@@ -20,7 +20,7 @@
-
+
systeminformation
diff --git a/docs/os.html b/docs/os.html
index 43b86b0..12f443e 100644
--- a/docs/os.html
+++ b/docs/os.html
@@ -20,7 +20,7 @@
-
+
systeminformation
diff --git a/docs/printer.html b/docs/printer.html
index c997641..f710525 100644
--- a/docs/printer.html
+++ b/docs/printer.html
@@ -20,7 +20,7 @@
-
+
systeminformation
diff --git a/docs/processes.html b/docs/processes.html
index dc8710e..a0a8004 100644
--- a/docs/processes.html
+++ b/docs/processes.html
@@ -20,7 +20,7 @@
-
+
systeminformation
diff --git a/docs/statsfunctions.html b/docs/statsfunctions.html
index f9adc36..ea80da3 100644
--- a/docs/statsfunctions.html
+++ b/docs/statsfunctions.html
@@ -20,7 +20,7 @@
-
+
systeminformation
diff --git a/docs/system.html b/docs/system.html
index c0af29d..3c707f9 100644
--- a/docs/system.html
+++ b/docs/system.html
@@ -20,7 +20,7 @@
-
+
systeminformation
diff --git a/docs/tests.html b/docs/tests.html
index 0c09311..20e48d2 100644
--- a/docs/tests.html
+++ b/docs/tests.html
@@ -20,7 +20,7 @@
-
+
systeminformation
diff --git a/docs/usb.html b/docs/usb.html
index b105d1f..f2ce20f 100644
--- a/docs/usb.html
+++ b/docs/usb.html
@@ -20,7 +20,7 @@
-
+
systeminformation
diff --git a/docs/v4/battery.html b/docs/v4/battery.html
index 800e833..0808a01 100644
--- a/docs/v4/battery.html
+++ b/docs/v4/battery.html
@@ -19,7 +19,7 @@
-
+
systeminformation
diff --git a/docs/v4/cpu.html b/docs/v4/cpu.html
index 7521618..5461448 100644
--- a/docs/v4/cpu.html
+++ b/docs/v4/cpu.html
@@ -19,7 +19,7 @@
-
+
systeminformation
diff --git a/docs/v4/docker.html b/docs/v4/docker.html
index 2f2b453..c40da33 100644
--- a/docs/v4/docker.html
+++ b/docs/v4/docker.html
@@ -19,7 +19,7 @@
-
+
systeminformation
diff --git a/docs/v4/filesystem.html b/docs/v4/filesystem.html
index c9a40c2..81e47ef 100644
--- a/docs/v4/filesystem.html
+++ b/docs/v4/filesystem.html
@@ -19,7 +19,7 @@
-
+
systeminformation
diff --git a/docs/v4/general.html b/docs/v4/general.html
index b2744bb..7040be0 100644
--- a/docs/v4/general.html
+++ b/docs/v4/general.html
@@ -19,7 +19,7 @@
-
+
systeminformation
diff --git a/docs/v4/gettingstarted.html b/docs/v4/gettingstarted.html
index 8cf3ae0..520fe0a 100644
--- a/docs/v4/gettingstarted.html
+++ b/docs/v4/gettingstarted.html
@@ -19,7 +19,7 @@
-
+
systeminformation
diff --git a/docs/v4/graphics.html b/docs/v4/graphics.html
index 5e574af..a8772d2 100644
--- a/docs/v4/graphics.html
+++ b/docs/v4/graphics.html
@@ -19,7 +19,7 @@
-
+
systeminformation
diff --git a/docs/v4/index.html b/docs/v4/index.html
index 8f55d9b..247a9d5 100644
--- a/docs/v4/index.html
+++ b/docs/v4/index.html
@@ -17,7 +17,7 @@
-
+
systeminformation
+
systeminformation
diff --git a/docs/v4/network.html b/docs/v4/network.html
index e341556..505731d 100644
--- a/docs/v4/network.html
+++ b/docs/v4/network.html
@@ -19,7 +19,7 @@
-
+
systeminformation
diff --git a/docs/v4/os.html b/docs/v4/os.html
index e6b4021..6966d1e 100644
--- a/docs/v4/os.html
+++ b/docs/v4/os.html
@@ -19,7 +19,7 @@
-
+
systeminformation
diff --git a/docs/v4/processes.html b/docs/v4/processes.html
index 229274b..68bb6c0 100644
--- a/docs/v4/processes.html
+++ b/docs/v4/processes.html
@@ -19,7 +19,7 @@
-
+
systeminformation
diff --git a/docs/v4/statsfunctions.html b/docs/v4/statsfunctions.html
index 00646b6..1329305 100644
--- a/docs/v4/statsfunctions.html
+++ b/docs/v4/statsfunctions.html
@@ -19,7 +19,7 @@
-
+
systeminformation
diff --git a/docs/v4/system.html b/docs/v4/system.html
index 7ed7760..435de8d 100644
--- a/docs/v4/system.html
+++ b/docs/v4/system.html
@@ -19,7 +19,7 @@
-
+
systeminformation
diff --git a/docs/v4/vbox.html b/docs/v4/vbox.html
index 961833a..90f4e07 100644
--- a/docs/v4/vbox.html
+++ b/docs/v4/vbox.html
@@ -19,7 +19,7 @@
-
+
systeminformation
diff --git a/docs/v4/wifi.html b/docs/v4/wifi.html
index 018aa32..611b474 100644
--- a/docs/v4/wifi.html
+++ b/docs/v4/wifi.html
@@ -19,7 +19,7 @@
-
+
systeminformation
diff --git a/docs/vbox.html b/docs/vbox.html
index 09dc67f..c82b2c5 100644
--- a/docs/vbox.html
+++ b/docs/vbox.html
@@ -20,7 +20,7 @@
-
+
systeminformation
diff --git a/docs/wifi.html b/docs/wifi.html
index 162904d..dd0ba6d 100644
--- a/docs/wifi.html
+++ b/docs/wifi.html
@@ -20,7 +20,7 @@
-
+
systeminformation
diff --git a/test/test.js b/test/test.js
index be363d7..f2cdf8f 100644
--- a/test/test.js
+++ b/test/test.js
@@ -1,5 +1,6 @@
const readline = require('readline');
const util = require('util');
+const utils = require('../lib/util');
const exec = require('child_process').exec;
const lib_version = require('../package.json').version;
const path = require('path');
@@ -78,13 +79,14 @@ process.stdin.on('keypress', (key, data) => {
console.time(['Time to complete']);
startDots();
const siPath = path.join(__dirname, 'si.js');
- exec(`node ${siPath} '${key}'`, { timeout: 30000 }, (error, stdout) => {
+ const sanitizedKey = utils.sanitizeShellString(key);
+ exec(`node ${siPath} '${sanitizedKey}'`, { timeout: 30000 }, (error, stdout) => {
waiting = false;
stopDots();
clearline();
if (error && error.signal) {
console.log();
- console.log('Key: ' + key);
+ console.log('Key: ' + sanitizedKey);
console.log('TIMEOUT!');
} else {
try {
@@ -95,7 +97,7 @@ process.stdin.on('keypress', (key, data) => {
} else if (stdout.toString().startsWith('"not_supported')) {
console.log();
console.timeEnd(['Time to complete']);
- console.log('Key: ' + key);
+ console.log('Key: ' + sanitizedKey);
console.log('Not supported');
} else if (stdout.toString()) {
data = JSON.parse(stdout.toString());
@@ -107,7 +109,7 @@ process.stdin.on('keypress', (key, data) => {
}
} catch (e) {
console.log();
- console.log('Key: ' + key);
+ console.log('Key: ' + sanitizedKey);
console.log('ERROR');
console.log('----------------------------------------------------------------------------------------------------');
console.log(stdout.toString());