why is my WiFi SSID redacted?

upgraded to 15.6 and "ipconfig getsummary en0" now only ever gives me that my Wi-Fi SSID is <redacted>

the airport command line is now defunct, I've also tried "ioreg -l -n AirportDriver |grep 80211SSID"  and also got <SSID Redacted>

networksetup -getinfo Wi-Fi only gives me a mac address for my Wi-Fi

I know I can get it from the GUI but I want a script that compares my current SSID with a list I have of trusted Wi-Fi SSID's which I was able to run on 15.5 - but now cannot

Have I missed something or should I report this as a new feature?

MacBook Air 13″, macOS 15.6

Posted on Jul 31, 2025 09:24 AM

Reply
Question marked as Top-ranking reply

Posted on Jul 31, 2025 12:04 PM

This still works on Sequoia v15.6, though I am not aware of any other command line utility that will retrieve anything other than redacted status. Even a Swift application that got this right earlier in the Sequoia release cycle now returns zilch.

system_profiler SPAirPortDataType | awk '/Current Network/ {getline;$1=$1; gsub(":",""); print;exit}'



32 replies
Question marked as Top-ranking reply

Jul 31, 2025 12:04 PM in response to Renchu

This still works on Sequoia v15.6, though I am not aware of any other command line utility that will retrieve anything other than redacted status. Even a Swift application that got this right earlier in the Sequoia release cycle now returns zilch.

system_profiler SPAirPortDataType | awk '/Current Network/ {getline;$1=$1; gsub(":",""); print;exit}'



Jul 31, 2025 08:11 PM in response to VikingOSX

Found another solution - create a shortcut with:

Get Wifi from Network Name

Append Network Name to UserDirectory

File Path: SSID.txt


Rename the shortcut to something useful (I've called it SSID) and then in terminal:

shortcuts run SSID


This now creates a text file with the WiFi SSID in it so that I can read it into my script


Not perfect but another workaround that might be a little more future proof incase they decide to stop SystemProfiler from reporting SSID's

Aug 1, 2025 02:18 PM in response to Renchu

I just whittled this code down from something I found on the web that was also used in cracking WiFi SSIDs, so for obvious reasons, I cannot post that link here. I have also cleaned up the code and modernized it for Python 3.13.5.


Steps:

  1. Install Python 3.13.5 or later from Python.org using their installer. Do not use Homebrew for this.
  2. Once Python 3.13.5 is installed, one must install the Python-Objective-C bindings (pyobjc) so one can use the scripting bridge to the Python frameworks.
    1. In the Terminal:
      1. pip3 install -U pyobjc
      2. pip3 list
  3. In System settings > Privacy & Security > Location Services panel, enable the Python entry.
  4. Copy/paste the following Python code into a proper syntax aware programming editor to retain the correct indent. Suggest BBEdit, Sublime Text, maybe TextMate. Definitely not Apple's TextEdit.
  5. Run it from the Terminal command line after making it executable (e.g. chmod +x ssid.py).


Code:


#!/usr/bin/env python3

"""
ssid.py

Usage: ssid.py
Result: returns default Wi-Fi SSID and BSSID address
Requirement: 1) Python 3.13.5 (or later) installed from Python.org.
                Do not use homebrew.
             2) pip3 install -U objc
             3) Python must be enabled in System Settings > Privacy & Security
                > Location Services
Tested with Python 3.13.5 on macOS Sequoia v15.6
Adapted from code on the web that did a great deal more but cannot be shared
VikingOSX, 2025-08-01, Apple Support Communities, No warranties at all
"""
import time
import sys
from CoreWLAN import CWWiFiClient
from CoreLocation import CLLocationManager

# how long we will wait for authorization
max_wait = 10


def main():
    location_manager = CLLocationManager.alloc().init()
    location_manager.requestWhenInUseAuthorization()
    location_manager.startUpdatingLocation()

    for i in range(1, max_wait):
        authorization_status = location_manager.authorizationStatus()
        if authorization_status in [3, 4]:
            break
        time.sleep(1)
    else:
        sys.exit('Unable to obtain authorisation, exiting...\n')
    # Get the default WiFi interface
    default_iface = CWWiFiClient.sharedWiFiClient().interface()
    default_ssid = default_iface.ssid()
    default_bssid = default_iface.bssid()
    print(f"{default_ssid}\n{default_bssid}")


if __name__ == '__main__':
    sys.exit(main())



Aug 2, 2025 12:59 AM in response to VikingOSX

Nice but I wouldn't install the whole of pyobjc - maybe change the import of the non standard python packages to - you would need to import subprocess:

import subprocess

try:
    from CoreWLAN import CWWiFiClient
    from CoreLocation import CLLocationManager
except ImportError:
    frmwk = [
        "pyobjc-framework-CoreLocation",
        "pyobjc-framework-CoreWLAN"
            ]
    subprocess.check_call([sys.executable, "-m", "pip", "install", frmwk, "-q"])
    from CoreWLAN import CWWiFiClient
    from CoreLocation import CLLocationManager

I'm also considering whether to use

location_manager.requestAlwaysAuthorization()

instead but to test it I have to create a new user each time, as once you give authorisation there appears to no way to delete it from the Location Services list - only disable it

or if you are brave, convert a system plist to xml - edit it - then convert it back to binary along with killing some processes and I am not wanting to muck around with system wide files like that on my main machine


I don't see how using homebrew installed python versus installing it from python.org can make any difference - but I would definitely ensure this was done in a venv so you don't muck around with the system wide version of python - 3.9 IIRC


I'm going to experiment with not even requiring CoreWLAN to give python Location Services authorisation as that is all I need for some scripts - but incorporate the full thing so I'm not using a subprocess.run() in the script I need it for


I still can't see this helping terminal having access though


as an aside I took the WiFi redactor Swift code and parsed it through the gemini CLI to turn it into python - which I've already got trained to check if non standard packages are installed so it added that and got

#!/usr/bin/env python3
import sys
import subprocess
import json

try:
    import objc
    from CoreLocation import CLLocationManager, kCLAuthorizationStatusAuthorizedAlways, kCLAuthorizationStatusAuthorized
    from CoreWLAN import CWWiFiClient
    from Foundation import NSObject, NSBundle
    from AppKit import NSApplication
except ImportError:
    print("Required pyobjc frameworks not found. Attempting to install...")
    try:
        required_frameworks = [
            "pyobjc-core",
            "pyobjc-framework-CoreLocation",
            "pyobjc-framework-CoreWLAN",
            "pyobjc-framework-Foundation",
            "pyobjc-framework-AppKit"
        ]
        for framework in required_frameworks:
            subprocess.check_call([sys.executable, "-m", "pip", "install", framework, "-q"])
        
        print("Required frameworks installed successfully.")
        import objc
        from CoreLocation import CLLocationManager, kCLAuthorizationStatusAuthorizedAlways, kCLAuthorizationStatusAuthorized
        from CoreWLAN import CWWiFiClient
        from Foundation import NSObject, NSBundle
        from AppKit import NSApplication
    except Exception as e:
        print(f"Failed to install required frameworks: {e}")
        sys.exit(1)

class LocationDelegate(NSObject):
    def locationManager_didChangeAuthorizationStatus_(self, manager, status):
        if status == kCLAuthorizationStatusAuthorizedAlways or status == kCLAuthorizationStatusAuthorized:
            try:
                interface = CWWiFiClient.sharedWiFiClient().interface()
                json_output = {
                    "interface": interface.interfaceName(),
                    "ssid": interface.ssid() or "failed to retrieve SSID",
                    "bssid": interface.bssid() or "failed to retrieve BSSID",
                }
            except Exception as e:
                json_output = {"error": str(e)}
        else:
            json_output = {"error": "location services denied"}

        print(json.dumps(json_output, indent=4))
        NSApplication.sharedApplication().terminate_(self)

    def applicationDidFinishLaunching_(self, notification):
        self.locationManager = CLLocationManager.alloc().init()
        self.locationManager.setDelegate_(self)
        self.locationManager.requestAlwaysAuthorization()

def main():
    # Ensure the application bundle is recognized for command-line tools
    bundle = NSBundle.mainBundle()
    if not bundle:
        info = {
            'CFBundleIdentifier': 'com.renchu.ssidscript',
        }
        objc.lookUpClass('NSBundle')._setMainBundle_(objc.lookUpClass('NSBundle').bundleWithInfoDictionary_(info))

    app = NSApplication.sharedApplication()
    delegate = LocationDelegate.alloc().init()
    app.setDelegate_(delegate)
    app.run()

if __name__ == "__main__":
    main()

Jul 31, 2025 10:41 AM in response to Renchu

Renchu wrote:

upgraded to 15.6 and "ipconfig getsummary en0" now only ever gives me that my Wi-Fi SSID is <redacted>
the airport command line is now defunct, I've also tried "ioreg -l -n AirportDriver |grep 80211SSID"  and also got <SSID Redacted>
networksetup -getinfo Wi-Fi only gives me a mac address for my Wi-Fi
I know I can get it from the GUI but I want a script that compares my current SSID with a list I have of trusted Wi-Fi SSID's which I was able to run on 15.5 - but now cannot
Have I missed something or should I report this as a new feature?


Is your Terminal still granted Full Disk Access...(?)




Jul 31, 2025 12:17 PM in response to VikingOSX

Thanks, that will have to do for now, takes a little longer but does the job, had looked at that report earlier but didn't read it properly and thought it was just giving me a list of all the networks near me - missed the start bit saying current network information due to the amount of wifi connections around me at the moment

Jul 31, 2025 12:41 PM in response to MrHoffman

wdutil also gives redacted and putting sudo into a script has other awkward requirements so not what I'm looking for

The Apple Developer Forums response from Apple is intriguing but you'd expect to see Terminal appear there if you have run something to request access to it - but it doesn't

I'm all for security but something like what the name of the Wi-Fi device I'm connected to is something I'm really not worried too much about


Thanks anyway

Jul 31, 2025 02:33 PM in response to Renchu

FWIW, using

ipconfig getsummary en0

in Terminal On my MacBook Air running Sequoia 15.5 (have not updated to 15.6 yet) provided the full un-redacted SSID name.


InterfaceType : WiFi

LinkStatusActive : TRUE

NetworkID : REDACTED BY ME

SSID : myFULLSSIDHERE

Security : WPA2_PSK



So I can only assume it has something to do with the script you are using.


Have you tested the command outside of a script. Just straight into Terminal?

Jul 31, 2025 02:53 PM in response to Renchu

Renchu wrote:

upgraded to 15.6 and "ipconfig getsummary en0" now only ever gives me that my Wi-Fi SSID is <redacted>
the airport command line is now defunct, I've also tried "ioreg -l -n AirportDriver |grep 80211SSID"  and also got <SSID Redacted>
networksetup -getinfo Wi-Fi only gives me a mac address for my Wi-Fi
I know I can get it from the GUI but I want a script that compares my current SSID with a list I have of trusted Wi-Fi SSID's which I was able to run on 15.5 - but now cannot
Have I missed something or should I report this as a new feature?



The 3 commands as posted above:


This does happen to be a Hotspot...( my NetworkID redaction in red)


for comparison only.




Intel MBP macoS 15.6

why is my WiFi SSID redacted?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.