Created
September 7, 2018 17:17
-
-
Save Davidnet/2e58c70b8a7caf82996a2d16133d3f25 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
def get_current_wifi_connection(): | |
for line in iw('dev', 'wlan0', 'link', _iter=True): | |
if "SSID" in line: | |
return line.split(":")[1] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment