cpu() fix virtualization, wifi() fix raspberry

This commit is contained in:
Sebastian Hildebrandt 2021-01-27 11:43:30 +01:00
parent afd105319c
commit 4a2b221d9e
5 changed files with 16 additions and 2 deletions

View File

@ -30,6 +30,7 @@ For major (breaking) changes - version 3 and 2 see end of page.
| Version | Date | Comment |
| -------------- | -------------- | -------- |
| 5.0.3 | 2020-01-27 | `cpu()` fix virtualization, `wifi()` fix raspberry |
| 5.0.2 | 2020-01-26 | updated typescript typings |
| 5.0.1 | 2020-01-26 | code cleanup |
| 5.0.0 | 2020-01-26 | new major version 5 release |

View File

@ -56,6 +56,11 @@
</tr>
</thead>
<tbody>
<tr>
<th scope="row">5.0.3</th>
<td>2020-01-27</td>
<td><span class="code">cpu()</span> fix virtualization, <span class="code">wifi()</span> fix raspberry</td>
</tr>
<tr>
<th scope="row">5.0.2</th>
<td>2020-01-26</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.0.2</span></div>
<div class="version">New Version: <span id="version">5.0.3</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

@ -550,6 +550,14 @@ function getCpu() {
cpuFlags().then(flags => {
result.flags = flags;
result.virtualization = flags.indexOf('vmx') > -1 || flags.indexOf('svm') > -1;
if (_windows) {
try {
const systeminfo = execSync('systeminfo').toString();
result.virtualization = result.virtualization || (systeminfo.indexOf('Virtualization Enabled In Firmware: Yes') !== -1) || (systeminfo.indexOf('Virtualisierung in Firmware aktiviert: Ja') !== -1) || (systeminfo.indexOf('Virtualisation activée dans le microprogramme : Qiu') !== -1);
} catch (e) {
util.noop();
}
}
if (_darwin) {
exec('sysctl machdep.cpu hw.cpufrequency_max hw.cpufrequency_min hw.packages hw.physicalcpu_max hw.ncpu hw.tbfrequency hw.cpufamily hw.cpusubfamily', function (error, stdout) {
let lines = stdout.toString().split('\n');

View File

@ -147,7 +147,7 @@ function getWifiNetworkAlt(iface) {
}
const parts = l.split(':');
if (parts.length > 1) {
wpaFlag = parts[1].trim();
wpaFlag = parts[1].trim().toUpperCase();
}
}
if (l.indexOf('pairwise cipher') >= 0) {