Unable to connect to Wi-Fi with xml profile when password starts with blank space

E

Edgaryo1

Hello I am using Windows10 and my Wi-Fi card is Intel(R) Dual Band Wireless-AC 7265.


My ESSID (I will call it 'MY_NETWORK_SSID') has a password that starts with a blank space (let's say ' StartsWithWhiteSpace'), if I do the connection manually it works fine and I get connected, but fails if I do the connection with netsh command using the profile:


Manually:

Select 'MY_NETWORK_SSID' and then use the password ' StartsWithWhiteSpace' and I get connected


By profile:

1.- Once logged manually I export the profile to a file

netsh wlan export profile file=. key=clear

2.- This will generate an xml file, that we can use to connect (I disconnect and forget the network before using the profile)

* netsh wlan add profile filename=c:\profile_password_starts_with_white_space.xml

* netsh wlan connect name='MY_NETWORK_SSID' interface='my_wireless_card_name'



With this 2 steps I am able to connect, but only if the password dont have spaces on it.



The following is the profile generated by: netsh wlan export profile file=. key=clear once I successfully logged manually using the password that starts with one space (I was expecting this same profile will work to login again but it always fails)

<?xml version="1.0"?>
<WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1">
<name>MY_NETWORK_SSID</name>
<SSIDConfig>
<SSID>
<hex>6D746C70617461625DA3546455727473</hex>
<name>MY_NETWORK_SSID</name>
</SSID>
</SSIDConfig>
<connectionType>ESS</connectionType>
<connectionMode>auto</connectionMode>
<MSM>
<security>
<authEncryption>
<authentication>WPA2PSK</authentication>
<encryption>AES</encryption>
<useOneX>false</useOneX>
</authEncryption>
<sharedKey>
<keyType>passPhrase</keyType>
<protected>false</protected>
<keyMaterial>
StartsWithWhiteSpace</keyMaterial>
</sharedKey>
</security>
</MSM>
<MacRandomization xmlns="http://www.microsoft.com/networking/WLAN/profile/v3">
<enableRandomization>false</enableRandomization>
<randomizationSeed>1191479147</randomizationSeed>
</MacRandomization>
</WLANProfile>


Why the own profile generated by the netsh tool doesn't work?

How to successfully connect with passwords with white spaces. Note I have already tried (&#32; and \u0020) to represent the white spaces

Continue reading...
 

Similar threads

Back
Top Bottom