Last active
May 4, 2019 18:50
-
-
Save jasonniebauer/56758bcaabf749b87d6db86f83efa7d4 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
#! /usr/bin/env python | |
import socket | |
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
s.connect(("8.8.8.8", 80)) | |
print(s.getsockname()[0]) | |
s.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment