Created
September 22, 2021 15:20
-
-
Save markmur/de278a39d3590386d3dba833e16989d3 to your computer and use it in GitHub Desktop.
Get Wifi password for current SSID
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get Wifi SSID | |
function get-ssid { | |
/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -I | awk -F: '/ SSID/{print $2}' | |
} | |
# Get wifi password for current SSID | |
function wifi-password { | |
security find-generic-password -wa $(get-ssid) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment