code refactor
This commit is contained in:
parent
7e267aa9af
commit
acbcb0c505
@ -324,6 +324,8 @@ function getWindowsIEEE8021x(connectionType, iface, ifaces) {
|
||||
state: 'Unknown',
|
||||
protocol: 'Unknown',
|
||||
};
|
||||
let i8021xState = '';
|
||||
let i8021xProtocol = '';
|
||||
if(connectionType == 'wired' && ifaces.length > 0){
|
||||
try {
|
||||
// Get 802.1x information by interface name
|
||||
@ -355,14 +357,15 @@ function getWindowsIEEE8021x(connectionType, iface, ifaces) {
|
||||
console.log('Entro al catch del wired');
|
||||
return i8021x;
|
||||
}
|
||||
} else if (connectionType == 'wireless' && ifaces.length > 0){
|
||||
} else if (connectionType == 'wireless'){
|
||||
try {
|
||||
const SSID = getWindowsWirelessIfaceSSID(iface);
|
||||
// const SSID = getWindowsWirelessIfaceSSID(iface);
|
||||
const SSID = '1';
|
||||
if(SSID !== 'Unknown') {
|
||||
console.log('ETAPA ERROR 1');
|
||||
let i8021xState = execSync(`netsh wlan show profiles "${SSID}" | findstr "802.1X"`, util.execOptsWin);
|
||||
i8021xState = execSync(`netsh wlan show profiles "${SSID}" | findstr "802.1X"`, util.execOptsWin);
|
||||
console.log('ETAPA ERROR 2');
|
||||
let i8021xProtocol = execSync(`netsh wlan show profiles "${SSID}" | findstr "EAP"`, util.execOptsWin);
|
||||
i8021xProtocol = execSync(`netsh wlan show profiles "${SSID}" | findstr "EAP"`, util.execOptsWin);
|
||||
console.log('ETAPA ERROR 3');
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user