diff --git a/respodns/checks.py b/respodns/checks.py index 2f36264..45b099b 100644 --- a/respodns/checks.py +++ b/respodns/checks.py @@ -21,6 +21,7 @@ new = [ likely = [ # these checks are, in practice, the most likely # to weed out unwanted DNS servers. + Check("news", "huanqiu.com"), Check("adware", rot13("nqf789.pbz")), @@ -30,6 +31,7 @@ likely = [ # some servers block piracy and porn sites for being taboo, or whatever. Check("porn", "pornhub.com"), + Check("adtrack", "media.fastclick.net"), # dns.watch fails here: domain parking is evil, but servers must abide. diff --git a/respodns/util.py b/respodns/util.py index 6e53ccb..af18cae 100644 --- a/respodns/util.py +++ b/respodns/util.py @@ -5,6 +5,10 @@ for a, b, c, d in zip("anAN05", "mzMZ49", "naNA50", "zmZM94"): range(ord(c), ord(d) + 1)))) +def rot13(s): + return "".join(rot13_mapping.get(c, c) for c in s) + + def right_now(): from datetime import datetime, timezone return datetime.now(timezone.utc) @@ -19,15 +23,12 @@ def nonsense_consistent(domain): 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): return nonsense_consistent(domain) + "." + domain def head(n, it): + # TODO: maybe just do return [a for _, a in zip(range(n), it)] res = [] try: while len(res) < n: