Skip to content

Instantly share code, notes, and snippets.

@markmur
Created September 22, 2021 15:20
Show Gist options
  • Save markmur/de278a39d3590386d3dba833e16989d3 to your computer and use it in GitHub Desktop.
Save markmur/de278a39d3590386d3dba833e16989d3 to your computer and use it in GitHub Desktop.
Get Wifi password for current SSID
# 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