#!/usr/bin/python3 # -*- coding: utf-8 -* import cgi import http.client import sys from socket import gethostbyname, gaierror form = cgi.FieldStorage() print("Content-type: text/html; charset=utf-8\n") name = "Website" urls = ["neodarz.ovh","plex.neodarz.ovh","git.neodarz.ovh"] for url in urls: try: c = http.client.HTTPConnection(url) c.request("HEAD", '') status = str(c.getresponse().status) except gaierror: status = "Name or service unknow !" html = """ Mon programme

""" + url + """ ->""" + status + """

""" print(html)