Usually, when connecting to any encrypted network, you have to enter the password for it in your wireless network settings, in which case your software may identify if a network is encrypted by WEP, WPA or WPA2 encryption.
FORBES: 5 Ways To Protect Your Computer While Traveling