networkInterfaces() sanitizing SSID names (windows)
This commit is contained in:
parent
51c7698b91
commit
f7af0a67b7
@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page.
|
||||
|
||||
| Version | Date | Comment |
|
||||
| ------- | ---------- | --------------------------------------------------------------------------------------------------- |
|
||||
| 5.23.7 | 2024-12-09 | `networkInterfaces()` sanitizing SSID names (windows) |
|
||||
| 5.23.6 | 2024-12-08 | `system()` added Raspberry CM5 detection |
|
||||
| 5.23.5 | 2024-08-21 | `processLoad()` fixed * process list (linux) |
|
||||
| 5.23.4 | 2024-08-06 | `baseboard()` `chassis()` cleaned defaults (linux) |
|
||||
|
||||
@ -57,6 +57,11 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">5.23.7</th>
|
||||
<td>2024-12-09</td>
|
||||
<td><span class="code">networkInterfaces()</span> sanitizing SSID names (windows)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">5.23.6</th>
|
||||
<td>2024-12-08</td>
|
||||
|
||||
@ -170,7 +170,7 @@
|
||||
<img class="logo" src="assets/logo.png" alt="logo">
|
||||
<div class="title">systeminformation</div>
|
||||
<div class="subtitle"><span id="typed"></span> </div>
|
||||
<div class="version">New Version: <span id="version">5.23.6</span></div>
|
||||
<div class="version">New Version: <span id="version">5.23.7</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">
|
||||
|
||||
@ -348,7 +348,7 @@ function getWindowsWirelessIfaceSSID(interfaceName) {
|
||||
try {
|
||||
const result = execSync(`netsh wlan show interface name="${interfaceName}" | findstr "SSID"`, util.execOptsWin);
|
||||
const SSID = result.split('\r\n').shift();
|
||||
const parseSSID = SSID.split(':').pop();
|
||||
const parseSSID = SSID.split(':').pop().trim();
|
||||
return parseSSID;
|
||||
} catch (error) {
|
||||
return 'Unknown';
|
||||
@ -400,8 +400,18 @@ function getWindowsIEEE8021x(connectionType, iface, ifaces) {
|
||||
try {
|
||||
const SSID = getWindowsWirelessIfaceSSID(iface);
|
||||
if (SSID !== 'Unknown') {
|
||||
i8021xState = execSync(`netsh wlan show profiles "${SSID}" | findstr "802.1X"`, util.execOptsWin);
|
||||
i8021xProtocol = execSync(`netsh wlan show profiles "${SSID}" | findstr "EAP"`, util.execOptsWin);
|
||||
|
||||
let ifaceSanitized = '';
|
||||
const s = util.isPrototypePolluted() ? '---' : util.sanitizeShellString(SSID);
|
||||
const l = util.mathMin(s.length, 2000);
|
||||
|
||||
for (let i = 0; i <= l; i++) {
|
||||
if (s[i] !== undefined) {
|
||||
ifaceSanitized = ifaceSanitized + s[i];
|
||||
}
|
||||
}
|
||||
i8021xState = execSync(`netsh wlan show profiles "${ifaceSanitized}" | findstr "802.1X"`, util.execOptsWin);
|
||||
i8021xProtocol = execSync(`netsh wlan show profiles "${ifaceSanitized}" | findstr "EAP"`, util.execOptsWin);
|
||||
}
|
||||
|
||||
if (i8021xState.includes(':') && i8021xProtocol.includes(':')) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user