fix style

This commit is contained in:
Connor Olding 2020-09-04 15:49:21 +02:00
parent 74f96f5c99
commit 788648aeb0

View File

@ -2,15 +2,20 @@ from .top1m import retrieve_top1m_entries
from .util import concat_nonsense, rot13, head
from .structs import Check
def order_by_failures(checks): # descending
return sorted(checks, key=lambda check: -check.failures)
first = [
# checking this first this avoids issues with censorship in China. see:
# https://www.bortzmeyer.org/sichuan-pepper.html
Check("common", "baidu.com", 491),
]
_sinkhole = "iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com"
_weirdsub = concat_nonsense("javarevisited.blogspot.com")
likely = order_by_failures([
# these checks are, in practice, the most likely
# to weed out unwanted DNS servers.
@ -33,7 +38,7 @@ likely = order_by_failures([
Check("gambling", "bet365.com", 157),
Check("gambling", "betonline.ag", 168),
Check("gambling", "unibet.com", 137),
Check("infosec", "iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com", 98),
Check("infosec", _sinkhole, 98),
Check("infosec", "scan.shadowserver.org", 73),
Check("news", "huanqiu.com", 435),
Check("news", "telegram.com", 71),
@ -45,7 +50,7 @@ likely = order_by_failures([
Check("uncommon", "react.uni-saarland.de", 74),
Check("usercontent", "4chan.org", 116),
# Check("weird", "archive.is", 0),
Check("weirdsub", concat_nonsense("javarevisited.blogspot.com"), 126),
Check("weirdsub", _weirdsub, 126),
])
unlikely = order_by_failures([