milky-way/space.py

24 lines
519 B
Python

import socket
import ssl
import eel
if __name__ == '__main__':
s = socket.create_connection(('iiiypuk.me', 1965))
context = ssl.SSLContext()
context.check_hostname = False
context.verify_mode = ssl.CERT_NONE
s = context.wrap_socket(s, server_hostname = 'iiiypuk.me')
s.sendall(('gemini://iiiypuk.me\r\n').encode("utf-8"))
fp = s.makefile("rb")
header = fp.readline()
header = header.decode("UTF-8").strip()
print(header)
# eel.init('ui')
# eel.start('index.html')