security: SecKeychainSearchCopyNext: (Wi-Fi password via Terminal)
Display the WiFi password of a named wireless network exactly like this, replacing "wifinetworkname" with your wireless network name in quotes:

security find-generic-password -D "AirPort network password" -l "wifinetworkname" -w