wifiConnections(), wifiNetworks() fix security mode parsing (macOS)

This commit is contained in:
Sebastian Hildebrandt 2025-05-25 18:00:56 +02:00
parent 3eba8e4731
commit 9105366ba2
7 changed files with 35 additions and 5 deletions

View File

@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
| Version | Date | Comment | | Version | Date | Comment |
| ------- | ---------- | --------------------------------------------------------------------------------------------------- | | ------- | ---------- | --------------------------------------------------------------------------------------------------- |
| 5.27.1 | 2025-05-24 | `wifiConnections()`, `wifiNetworks()` fix security mode parsing (macOS) |
| 5.27.0 | 2025-05-24 | `mem()` added reclaimable (Linux, macOS) | | 5.27.0 | 2025-05-24 | `mem()` added reclaimable (Linux, macOS) |
| 5.26.2 | 2025-05-23 | `memLayout()` manufacturers reference updated | | 5.26.2 | 2025-05-23 | `memLayout()` manufacturers reference updated |
| 5.26.1 | 2025-05-22 | `inetChecksite()` fix timeout | | 5.26.1 | 2025-05-22 | `inetChecksite()` fix timeout |

View File

@ -57,6 +57,11 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr>
<th scope="row">5.27.1</th>
<td>2024-05-25</td>
<td><span class="code">wifiNetworks()</span> fix security mode parsing (macOS)</td>
</tr>
<tr> <tr>
<th scope="row">5.27.0</th> <th scope="row">5.27.0</th>
<td>2024-05-24</td> <td>2024-05-24</td>

View File

@ -170,7 +170,7 @@
<img class="logo" src="assets/logo.png" alt="logo"> <img class="logo" src="assets/logo.png" alt="logo">
<div class="title">systeminformation</div> <div class="title">systeminformation</div>
<div class="subtitle"><span id="typed"></span>&nbsp;</div> <div class="subtitle"><span id="typed"></span>&nbsp;</div>
3<div class="version">New Version: <span id="version">5.27.0</span></div> 3<div class="version">New Version: <span id="version">5.27.1</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> <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>
<div class="down"> <div class="down">
@ -204,7 +204,7 @@
</div> </div>
<div class="row number-section"> <div class="row number-section">
<div class="col-xl-4 col-lg-4 col-md-4 col-12"> <div class="col-xl-4 col-lg-4 col-md-4 col-12">
<div class="numbers">18,452</div> <div class="numbers">18,504</div>
<div class="title">Lines of code</div> <div class="title">Lines of code</div>
</div> </div>
<div class="col-xl-4 col-lg-4 col-md-4 col-12"> <div class="col-xl-4 col-lg-4 col-md-4 col-12">
@ -212,7 +212,7 @@
<div class="title">Downloads last month</div> <div class="title">Downloads last month</div>
</div> </div>
<div class="col-xl-4 col-lg-4 col-md-4 col-12"> <div class="col-xl-4 col-lg-4 col-md-4 col-12">
<div class="numbers">845</div> <div class="numbers">847</div>
<div class="title">Dependents</div> <div class="title">Dependents</div>
</div> </div>
</div> </div>

View File

@ -571,6 +571,21 @@ const socketTypes = {
70: 'LGA2422', 70: 'LGA2422',
71: 'LGA5773', 71: 'LGA5773',
72: 'BGA5773', 72: 'BGA5773',
73: 'AM5',
74: 'SP5',
75: 'SP6',
76: 'BGA883',
77: 'BGA1190',
78: 'BGA4129',
79: 'LGA4710',
80: 'LGA7529',
81: 'BGA1964',
82: 'BGA1792',
83: 'BGA2049',
84: 'BGA2551',
85: 'LGA1851',
86: 'BGA2114',
87: 'BGA2833'
}; };
const socketTypesByName = { const socketTypesByName = {

View File

@ -635,6 +635,10 @@ function smartMonToolsInstalled() {
return _smartMonToolsInstalled; return _smartMonToolsInstalled;
} }
// reference values: https://elinux.org/RPi_HardwareHistory
// https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md
// https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#hardware-revision-codes
function isRaspberry(cpuinfo) { function isRaspberry(cpuinfo) {
const PI_MODEL_NO = [ const PI_MODEL_NO = [
'BCM2708', 'BCM2708',

View File

@ -405,7 +405,7 @@ function parseWifiDarwin(wifiStr) {
wifiObj.forEach(function (wifiItem) { wifiObj.forEach(function (wifiItem) {
let security = []; let security = [];
const sm = wifiItem.spairport_security_mode; const sm = wifiItem.spairport_security_mode || '';
if (sm === 'spairport_security_mode_wep') { if (sm === 'spairport_security_mode_wep') {
security.push('WEP'); security.push('WEP');
} else if (sm === 'spairport_security_mode_wpa2_personal') { } else if (sm === 'spairport_security_mode_wpa2_personal') {
@ -666,7 +666,7 @@ function wifiConnections(callback) {
const signalLevel = airportWifiObj.spairport_signal_noise || null; const signalLevel = airportWifiObj.spairport_signal_noise || null;
let security = []; let security = [];
const sm = airportWifiObj.spairport_security_mode; const sm = airportWifiObj.spairport_security_mode || '';
if (sm === 'spairport_security_mode_wep') { if (sm === 'spairport_security_mode_wep') {
security.push('WEP'); security.push('WEP');
} else if (sm === 'spairport_security_mode_wpa2_personal') { } else if (sm === 'spairport_security_mode_wpa2_personal') {

View File

@ -69,6 +69,11 @@ function test(f) {
}); });
} }
if (process.argv.length < 3) {
console.log("error - a test key is required");
process.exit(1);
}
const key = process.argv[2]; const key = process.argv[2];
test(key).then((data) => { test(key).then((data) => {