Last active
March 20, 2023 18:01
-
-
Save keithweaver/00edf356e8194b89ed8d3b7bbead000c to your computer and use it in GitHub Desktop.
Get Wifi information on Mac OSx using Python
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
# I tried to use the pip install wifi but it really didn't work. | |
# So created this | |
import subprocess | |
process = subprocess.Popen(['/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport','-I'], stdout=subprocess.PIPE) | |
out, err = process.communicate() | |
process.wait() | |
print(out) | |
''' | |
Print out is: | |
agrCtlRSSI: -50 | |
agrExtRSSI: 0 | |
agrCtlNoise: -91 | |
agrExtNoise: 0 | |
state: running | |
op mode: station | |
lastTxRate: 243 | |
maxRate: 300 | |
lastAssocStatus: 0 | |
802.11 auth: open | |
link auth: wpa2 | |
BSSID: 24:de:c6:a6:9c:da | |
SSID: QueensuSecure_WPA2 | |
MCS: 14 | |
channel: 44,1 | |
''' | |
# SSID is the wifi name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Maybe make this:(if need get available wifi networks)