Import the dnscry.pt-merge scripts
This commit is contained in:
parent
09b83f18af
commit
a12fd83347
27
utils/dnscry.pt-merge.py
Executable file
27
utils/dnscry.pt-merge.py
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
#! /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)
|
27
utils/dnscry.pt-relays-merge.py
Executable file
27
utils/dnscry.pt-relays-merge.py
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
#! /usr/bin/env python3
|
||||||
|
|
||||||
|
# Origin: https://www.dnscry.pt/anon-relays.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)
|
Loading…
x
Reference in New Issue
Block a user