superficial cleanup
This commit is contained in:
parent
ca136b65a3
commit
484de18d46
2 changed files with 7 additions and 4 deletions
|
@ -21,6 +21,7 @@ new = [
|
||||||
likely = [
|
likely = [
|
||||||
# these checks are, in practice, the most likely
|
# these checks are, in practice, the most likely
|
||||||
# to weed out unwanted DNS servers.
|
# to weed out unwanted DNS servers.
|
||||||
|
|
||||||
Check("news", "huanqiu.com"),
|
Check("news", "huanqiu.com"),
|
||||||
Check("adware", rot13("nqf789.pbz")),
|
Check("adware", rot13("nqf789.pbz")),
|
||||||
|
|
||||||
|
@ -30,6 +31,7 @@ likely = [
|
||||||
|
|
||||||
# some servers block piracy and porn sites for being taboo, or whatever.
|
# some servers block piracy and porn sites for being taboo, or whatever.
|
||||||
Check("porn", "pornhub.com"),
|
Check("porn", "pornhub.com"),
|
||||||
|
|
||||||
Check("adtrack", "media.fastclick.net"),
|
Check("adtrack", "media.fastclick.net"),
|
||||||
|
|
||||||
# dns.watch fails here: domain parking is evil, but servers must abide.
|
# dns.watch fails here: domain parking is evil, but servers must abide.
|
||||||
|
|
|
@ -5,6 +5,10 @@ for a, b, c, d in zip("anAN05", "mzMZ49", "naNA50", "zmZM94"):
|
||||||
range(ord(c), ord(d) + 1))))
|
range(ord(c), ord(d) + 1))))
|
||||||
|
|
||||||
|
|
||||||
|
def rot13(s):
|
||||||
|
return "".join(rot13_mapping.get(c, c) for c in s)
|
||||||
|
|
||||||
|
|
||||||
def right_now():
|
def right_now():
|
||||||
from datetime import datetime, timezone
|
from datetime import datetime, timezone
|
||||||
return datetime.now(timezone.utc)
|
return datetime.now(timezone.utc)
|
||||||
|
@ -19,15 +23,12 @@ def nonsense_consistent(domain):
|
||||||
return "".join(rng.choice(ascii_lowercase) for i in range(length))
|
return "".join(rng.choice(ascii_lowercase) for i in range(length))
|
||||||
|
|
||||||
|
|
||||||
def rot13(s):
|
|
||||||
return "".join(rot13_mapping.get(c, c) for c in s)
|
|
||||||
|
|
||||||
|
|
||||||
def concat_nonsense(domain):
|
def concat_nonsense(domain):
|
||||||
return nonsense_consistent(domain) + "." + domain
|
return nonsense_consistent(domain) + "." + domain
|
||||||
|
|
||||||
|
|
||||||
def head(n, it):
|
def head(n, it):
|
||||||
|
# TODO: maybe just do return [a for _, a in zip(range(n), it)]
|
||||||
res = []
|
res = []
|
||||||
try:
|
try:
|
||||||
while len(res) < n:
|
while len(res) < n:
|
||||||
|
|
Loading…
Add table
Reference in a new issue