zdenekpetrzd

ip adress

May 12th, 2019
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.15 KB | None | 0 0
  1. ip_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
  2. ip_socket.connect(("8.8.8.8", 80))
  3. host = ip_socket.getsockname()[0]
  4. ip_socket.close()
Advertisement
Add Comment
Please, Sign In to add comment