Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # python3 Sockit.py
- # those of you who have multiple socket.py files? rename them or you'd find a lot of conflicts!
- import socket
- s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
- s.connect(("8.8.8.8", 80))
- print(s.getsockname()[0])
- s.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement