Handle execption when empty string is return
This commit is contained in:
parent
4fdfa35c8d
commit
72caae8a1c
@ -360,10 +360,18 @@ function getWindowsIEEE8021x(connectionType, iface, ifaces) {
|
||||
const SSID = getWindowsWirelessIfaceSSID(iface);
|
||||
if(SSID !== 'Unknown') {
|
||||
let i8021xState = execSync(`netsh wlan show profiles "${SSID}" | findstr "802.1X"`, util.execOptsWin);
|
||||
if(i8021xState){
|
||||
i8021x.state = i8021xState.split(':').pop();
|
||||
} else{
|
||||
i8021x.state = "Disabled";
|
||||
}
|
||||
console.log('WIRELESS STATE 802',i8021x.state);
|
||||
let i8021xProtocol = execSync(`netsh wlan show profiles "${SSID}" | findstr "EAP"`, util.execOptsWin);
|
||||
if(i8021xProtocol){
|
||||
i8021x.protocol = i8021xProtocol.split(':').pop();
|
||||
} else{
|
||||
i8021x.protocol = "Disabled";
|
||||
}
|
||||
console.log('WIRELESS PROTOCOL 802',i8021x.protocol);
|
||||
}
|
||||
return i8021x;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user