-
-
Save jsbain/66b3975828df7eabac6cdbce42fb1d41 to your computer and use it in GitHub Desktop.
Untitled_168.py
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
from objc_util import * | |
load_framework('SystemConfiguration') | |
c.CNCopySupportedInterfaces.argtypes=[] | |
c.CNCopySupportedInterfaces.restype=c_void_p | |
c.CNCopyCurrentNetworkInfo.argtypes=[c_void_p] | |
c.CNCopyCurrentNetworkInfo.restype=c_void_p | |
ifs=c.CNCopySupportedInterfaces() | |
ifs=ObjCInstance(ifs) | |
for ifnam in ifs: | |
info=ObjCInstance(c.CNCopyCurrentNetworkInfo(ifnam)) | |
if info['SSID']: | |
WIFIname=str(info['SSID']) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment