From 36d3ba0c67f9c36a5fdd7ee71992ce645f59ce4b Mon Sep 17 00:00:00 2001 From: ricardopolo Date: Thu, 14 Nov 2019 09:45:52 -0500 Subject: [PATCH] Debuggin wireless funciton 802.1x --- lib/network.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/network.js b/lib/network.js index f9d6b40..0b0f90d 100644 --- a/lib/network.js +++ b/lib/network.js @@ -359,19 +359,21 @@ function getWindowsIEEE8021x(connectionType, iface, ifaces) { try { const SSID = getWindowsWirelessIfaceSSID(iface); if(SSID !== 'Unknown') { + console.log('ETAPA ERROR 1'); 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); + console.log('ETAPA ERROR 2'); let i8021xProtocol = execSync(`netsh wlan show profiles "${SSID}" | findstr "EAP"`, util.execOptsWin); - if(i8021xProtocol){ + 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.protocol = "Disabled"; + i8021x.state = "Disabled"; + i8021x.protocol = "Not configured"; } + console.log('WIRELESS STATE 802',i8021x.state); console.log('WIRELESS PROTOCOL 802',i8021x.protocol); } return i8021x;