systeminformation 5.21.17 → 5.21.19

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/index.d.ts CHANGED
@@ -378,7 +378,6 @@ export namespace Systeminformation {
378
378
  uefi: boolean | null;
379
379
  hypervizor?: boolean;
380
380
  remoteSession?: boolean;
381
- hypervisor?: boolean;
382
381
  }
383
382
 
384
383
  interface UuidData {
package/lib/network.js CHANGED
@@ -1525,7 +1525,7 @@ function networkConnections(callback) {
1525
1525
  }
1526
1526
  if (_darwin) {
1527
1527
  // let cmd = 'netstat -natv | grep "ESTABLISHED\\|SYN_SENT\\|SYN_RECV\\|FIN_WAIT1\\|FIN_WAIT2\\|TIME_WAIT\\|CLOSE\\|CLOSE_WAIT\\|LAST_ACK\\|LISTEN\\|CLOSING\\|UNKNOWN"';
1528
- let cmd = 'netstat -natv | grep "tcp4\\|tcp6\\|udp4\\|udp6"';
1528
+ let cmd = 'netstat -natvln | grep "tcp4\\|tcp6\\|udp4\\|udp6"';
1529
1529
  const states = 'ESTABLISHED|SYN_SENT|SYN_RECV|FIN_WAIT1|FIN_WAIT2|TIME_WAIT|CLOSE|CLOSE_WAIT|LAST_ACK|LISTEN|CLOSING|UNKNOWN';
1530
1530
  exec(cmd, { maxBuffer: 1024 * 20000 }, function (error, stdout) {
1531
1531
  if (!error) {
package/lib/util.js CHANGED
@@ -423,6 +423,11 @@ function powerShellRelease() {
423
423
 
424
424
  function powerShell(cmd) {
425
425
 
426
+ const pattern = [
427
+ '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
428
+ '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))'
429
+ ].join('|');
430
+
426
431
  if (_psPersistent) {
427
432
  const id = Math.random().toString(36).substring(2, 12);
428
433
  return new Promise((resolve) => {
@@ -467,7 +472,7 @@ function powerShell(cmd) {
467
472
  }
468
473
  if (child && child.pid) {
469
474
  child.stdout.on('data', function (data) {
470
- result = result + data.toString('utf8');
475
+ result = result + data.toString('utf8').replace(pattern, '');
471
476
  });
472
477
  child.stderr.on('data', function () {
473
478
  child.kill();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "systeminformation",
3
- "version": "5.21.17",
3
+ "version": "5.21.19",
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)",