Skip to content

Instantly share code, notes, and snippets.

@ruseel
Last active September 16, 2026 17:10
Show Gist options
  • Select an option

  • Save ruseel/b1e3568c237c823260c6781bbebd0875 to your computer and use it in GitHub Desktop.

Select an option

Save ruseel/b1e3568c237c823260c6781bbebd0875 to your computer and use it in GitHub Desktop.
On Tahoe, system_profiler and ifconfig getsummary SSID string is 'redacted', so this CoreWLAN workaround is needed.
#!/bin/bash
# On macOS Tahoe, system_profiler and `ifconfig getsummary` can report
# the SSID string as "redacted". Use CoreWLAN via Swift to get the SSID.
swift -e 'import CoreWLAN; let i=CWWiFiClient.shared().interface(); let p=i?.configuration()?.networkProfiles.firstObject as? CWNetworkProfile; print(i?.ssid() ?? p?.ssid ?? "")'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment