Created
October 17, 2024 02:46
-
-
Save linw1995/9d76879b9f4743d4cb7a903b29b1870c to your computer and use it in GitHub Desktop.
AppleScript to get wifi info
This file contains 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
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