Do not show console on systeminformation
This commit is contained in:
parent
acbcb0c505
commit
3039668621
@ -307,12 +307,9 @@ function getWindowsWiredProfilesInformation() {
|
|||||||
|
|
||||||
function getWindowsWirelessIfaceSSID(interfaceName){
|
function getWindowsWirelessIfaceSSID(interfaceName){
|
||||||
try {
|
try {
|
||||||
console.log('NOMBRE DE LA INTEFACE:', interfaceName);
|
|
||||||
const result = execSync(`netsh wlan show interface name="${interfaceName}" | findstr "SSID"`, util.execOptsWin);
|
const result = execSync(`netsh wlan show interface name="${interfaceName}" | findstr "SSID"`, util.execOptsWin);
|
||||||
const SSID = result.split('\r\n').shift();
|
const SSID = result.split('\r\n').shift();
|
||||||
console.log('SSID COMPLETO:', SSID);
|
|
||||||
const parseSSID = SSID.split(':').pop();
|
const parseSSID = SSID.split(':').pop();
|
||||||
console.log('SSID FINAL:', parseSSID);
|
|
||||||
return parseSSID;
|
return parseSSID;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return 'Unknown';
|
return 'Unknown';
|
||||||
@ -354,7 +351,7 @@ function getWindowsIEEE8021x(connectionType, iface, ifaces) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('Entro al catch del wired');
|
// console.log('Entro al catch del wired');
|
||||||
return i8021x;
|
return i8021x;
|
||||||
}
|
}
|
||||||
} else if (connectionType == 'wireless'){
|
} else if (connectionType == 'wireless'){
|
||||||
@ -362,31 +359,24 @@ function getWindowsIEEE8021x(connectionType, iface, ifaces) {
|
|||||||
// const SSID = getWindowsWirelessIfaceSSID(iface);
|
// const SSID = getWindowsWirelessIfaceSSID(iface);
|
||||||
const SSID = '1';
|
const SSID = '1';
|
||||||
if(SSID !== 'Unknown') {
|
if(SSID !== 'Unknown') {
|
||||||
console.log('ETAPA ERROR 1');
|
|
||||||
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');
|
|
||||||
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');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('Entro al catch del wireless');
|
// console.log('Entro al catch del wireless');
|
||||||
i8021x.state = "Disabled";
|
i8021x.state = "Disabled";
|
||||||
i8021x.protocol = "Not configured";
|
i8021x.protocol = "Not configured";
|
||||||
return i8021x;
|
return i8021x;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i8021xState.includes(':') && i8021xProtocol.includes(':')) {
|
if (i8021xState.includes(':') && i8021xProtocol.includes(':')) {
|
||||||
console.log('ETAPA ERROR 4');
|
|
||||||
i8021x.state = i8021xState.split(':').pop();
|
i8021x.state = i8021xState.split(':').pop();
|
||||||
console.log('ETAPA ERROR 5');
|
|
||||||
i8021x.protocol = i8021xProtocol.split(':').pop();
|
i8021x.protocol = i8021xProtocol.split(':').pop();
|
||||||
}
|
}
|
||||||
console.log('WIRELESS STATE 802',i8021x.state);
|
|
||||||
console.log('WIRELESS PROTOCOL 802',i8021x.protocol);
|
|
||||||
return i8021x;
|
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