system() fixed vm detection (linux)

This commit is contained in:
Sebastian Hildebrandt 2021-05-07 19:10:25 +02:00
parent 9520b43d6d
commit ea18f0b4e4
4 changed files with 9 additions and 3 deletions

View File

@ -77,7 +77,8 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
| Version | Date | Comment |
| -------------- | -------------- | -------- |
| 5.6.19 | 2021-05-06 | `services()` modified service listing (linux) |
| 5.6.20 | 2021-05-07 | `system()` fixed vm detection (linux) |
| 5.6.19 | 2021-05-06 | `services()` modified service listing (linux) |
| 5.6.18 | 2021-05-06 | `processes()` fixed Windows mem bug (naming conform to all platforms) |
| 5.6.17 | 2021-05-05 | `networkInterfaces()` fixed Windows XP bug (WMIC NetEnabled) |
| 5.6.16 | 2021-05-05 | `graphics()` fixed compare bug |

View File

@ -56,6 +56,11 @@
</tr>
</thead>
<tbody>
<tr>
<th scope="row">5.6.20</th>
<td>2021-05-07</td>
<td><span class="code">system()</span> fixed vm detection (linux)</td>
</tr>
<tr>
<th scope="row">5.6.19</th>
<td>2021-05-06</td>

View File

@ -170,7 +170,7 @@
<img class="logo" src="assets/logo.png">
<div class="title">systeminformation</div>
<div class="subtitle"><span id="typed"></span>&nbsp;</div>
<div class="version">New Version: <span id="version">5.6.19</span></div>
<div class="version">New Version: <span id="version">5.6.20</span></div>
<button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button>
</div>
<div class="down">

View File

@ -159,7 +159,7 @@ function system(callback) {
result.model = 'Docker Container';
}
try {
const stdout = execSync('dmesg 2>/dev/null | grep -iE "virtual|hypervisor" | grep -iE "vmware|qemu|kvm|xen"');
const stdout = execSync('dmesg 2>/dev/null | grep -iE "virtual|hypervisor" | grep -iE "vmware|qemu|kvm|xen" | grep -vi "Nested Virtualization"');
// detect virtual machines
let lines = stdout.toString().split('\n');
if (lines.length > 0) {