28 lines
567 B
Python
Executable File
28 lines
567 B
Python
Executable File
#! /usr/bin/env python3
|
|
|
|
# Origin: https://www.dnscry.pt/resolvers.md
|
|
|
|
import sys
|
|
|
|
|
|
servers = {}
|
|
|
|
in_header = True
|
|
|
|
with sys.stdin as f:
|
|
while True:
|
|
head = f.readline()
|
|
if not head:
|
|
break
|
|
if in_header == True:
|
|
if head.startswith("## "):
|
|
in_header = False
|
|
else:
|
|
continue
|
|
if head.startswith("## "):
|
|
name = head.split("## ")[1]
|
|
name = f"dnscry.pt-{name}".replace(" ", "")
|
|
print(f"## {name}")
|
|
else:
|
|
print(head)
|