Last active
September 28, 2024 19:41
-
-
Save brunerd/3a3e12267c4a5bb98fd696f1604a556c to your computer and use it in GitHub Desktop.
Get the per-network Private MAC Address Mode new for Sequoia
This file contains hidden or 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 network SSID (can take hella long time ~6s but Sequoia broke networksetup -getairportnetwork method) | |
#https://snelson.us/2024/09/determining-a-macs-ssid-like-an-animal/ | |
SSID=$(system_profiler -detailLevel basic SPAirPortDataType | awk '/Current Network Information:/ { getline; print substr($0, 13, (length($0) - 13)); exit }') | |
#find the pref in com.apple.wifi.known-networks, possible values are: off, static, rotating | |
PrivateMACAddressMode=$(/usr/libexec/PlistBuddy -c "print :wifi.network.ssid.'${SSID}':PrivateMACAddressModeUserSetting" /Library/Preferences/com.apple.wifi.known-networks.plist) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment