Do not show console on systeminformation

This commit is contained in:
ricardopolo 2019-11-14 10:55:23 -05:00
parent acbcb0c505
commit 3039668621

View File

@ -307,12 +307,9 @@ function getWindowsWiredProfilesInformation() {
function getWindowsWirelessIfaceSSID(interfaceName){
try {
console.log('NOMBRE DE LA INTEFACE:', interfaceName);
const result = execSync(`netsh wlan show interface name="${interfaceName}" | findstr "SSID"`, util.execOptsWin);
const SSID = result.split('\r\n').shift();
console.log('SSID COMPLETO:', SSID);
const parseSSID = SSID.split(':').pop();
console.log('SSID FINAL:', parseSSID);
return parseSSID;
} catch (error) {
return 'Unknown';
@ -354,7 +351,7 @@ function getWindowsIEEE8021x(connectionType, iface, ifaces) {
}
} catch (error) {
console.log('Entro al catch del wired');
// console.log('Entro al catch del wired');
return i8021x;
}
} else if (connectionType == 'wireless'){
@ -362,31 +359,24 @@ function getWindowsIEEE8021x(connectionType, iface, ifaces) {
// const SSID = getWindowsWirelessIfaceSSID(iface);
const SSID = '1';
if(SSID !== 'Unknown') {
console.log('ETAPA ERROR 1');
i8021xState = execSync(`netsh wlan show profiles "${SSID}" | findstr "802.1X"`, util.execOptsWin);
console.log('ETAPA ERROR 2');
i8021xProtocol = execSync(`netsh wlan show profiles "${SSID}" | findstr "EAP"`, util.execOptsWin);
console.log('ETAPA ERROR 3');
}
} 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;
}
if (i8021xState.includes(':') && i8021xProtocol.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;
}