Skip to content

Instantly share code, notes, and snippets.

@linw1995
Created October 17, 2024 02:46
Show Gist options
  • Save linw1995/9d76879b9f4743d4cb7a903b29b1870c to your computer and use it in GitHub Desktop.
Save linw1995/9d76879b9f4743d4cb7a903b29b1870c to your computer and use it in GitHub Desktop.
AppleScript to get wifi info
use AppleScript version "2.8" -- Yosemite (10.10) or later
use framework "Foundation"
use framework "CoreWLAN"
use scripting additions
set wifiInterface to current application's CWInterface's interfaceWithName:"en0"
-- Require location permission granted
-- Print the entire object
log quoted form of (wifiInterface's interfaceName as string)
log quoted form of (wifiInterface's ssid() as string)
log quoted form of (wifiInterface's bssid() as string)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment