Skip to content

Instantly share code, notes, and snippets.

@herrfz
Created November 18, 2016 08:46
Show Gist options
  • Save herrfz/07efcf92f6201d0a55887f61f316365e to your computer and use it in GitHub Desktop.
Save herrfz/07efcf92f6201d0a55887f61f316365e to your computer and use it in GitHub Desktop.
import socket
addr_info = socket.getaddrinfo("towel.blinkenlights.nl", 23)
addr = addr_info[0][-1]
s = socket.socket()
s.connect(addr)
while True:
data = s.recv(500)
print(str(data, 'utf8'), end='')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment