Code refactor
This commit is contained in:
parent
36d3ba0c67
commit
5d5a6ff439
@ -363,24 +363,25 @@ function getWindowsIEEE8021x(connectionType, iface, ifaces) {
|
|||||||
let i8021xState = execSync(`netsh wlan show profiles "${SSID}" | findstr "802.1X"`, util.execOptsWin);
|
let i8021xState = execSync(`netsh wlan show profiles "${SSID}" | findstr "802.1X"`, util.execOptsWin);
|
||||||
console.log('ETAPA ERROR 2');
|
console.log('ETAPA ERROR 2');
|
||||||
let i8021xProtocol = execSync(`netsh wlan show profiles "${SSID}" | findstr "EAP"`, util.execOptsWin);
|
let i8021xProtocol = execSync(`netsh wlan show profiles "${SSID}" | findstr "EAP"`, util.execOptsWin);
|
||||||
console.log('ETAPA ERROR 3');
|
console.log('ETAPA ERROR 3');
|
||||||
if(i8021xState && i8021xState){
|
|
||||||
console.log('ETAPA ERROR 4');
|
|
||||||
i8021x.state = i8021xState.split(':').pop();
|
|
||||||
console.log('ETAPA ERROR 5');
|
|
||||||
i8021x.protocol = i8021xProtocol.split(':').pop();
|
|
||||||
} else{
|
|
||||||
i8021x.state = "Disabled";
|
|
||||||
i8021x.protocol = "Not configured";
|
|
||||||
}
|
|
||||||
console.log('WIRELESS STATE 802',i8021x.state);
|
|
||||||
console.log('WIRELESS PROTOCOL 802',i8021x.protocol);
|
|
||||||
}
|
}
|
||||||
return i8021x;
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('Entro al catch del wireless');
|
console.log('Entro al catch del wireless');
|
||||||
|
i8021x.state = "Disabled";
|
||||||
|
i8021x.protocol = "Not configured";
|
||||||
return i8021x;
|
return i8021x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (i8021xState.includes(':') && i8021xState.includes(':')) {
|
||||||
|
console.log('ETAPA ERROR 4');
|
||||||
|
i8021x.state = i8021xState.split(':').pop();
|
||||||
|
console.log('ETAPA ERROR 5');
|
||||||
|
i8021x.protocol = i8021xProtocol.split(':').pop();
|
||||||
|
}
|
||||||
|
console.log('WIRELESS STATE 802',i8021x.state);
|
||||||
|
console.log('WIRELESS PROTOCOL 802',i8021x.protocol);
|
||||||
|
return i8021x;
|
||||||
}
|
}
|
||||||
console.log('Entre al valor por defecto');
|
console.log('Entre al valor por defecto');
|
||||||
return i8021x;
|
return i8021x;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user