Skip to content

Commit

Permalink
contrib: makeseeds: Read suspicious hosts from a file instead of hard…
Browse files Browse the repository at this point in the history
…coding
  • Loading branch information
sanjaykdragon committed Jan 7, 2020
1 parent b931f61 commit e1c582c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
10 changes: 3 additions & 7 deletions contrib/seeds/makeseeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,9 @@

# These are hosts that have been observed to be behaving strangely (e.g.
# aggressively connecting to every node).
SUSPICIOUS_HOSTS = {
"130.211.129.106", "178.63.107.226",
"83.81.130.26", "88.198.17.7", "148.251.238.178", "176.9.46.6",
"54.173.72.127", "54.174.10.182", "54.183.64.54", "54.194.231.211",
"54.66.214.167", "54.66.220.137", "54.67.33.14", "54.77.251.214",
"54.94.195.96", "54.94.200.247"
}
with open("suspicious_hosts.txt", mode="r", encoding="utf-8") as f:
SUSPICIOUS_HOSTS = {s.strip() for s in f if s.strip()}


PATTERN_IPV4 = re.compile(r"^((\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})):(\d+)$")
PATTERN_IPV6 = re.compile(r"^\[([0-9a-z:]+)\]:(\d+)$")
Expand Down
16 changes: 16 additions & 0 deletions contrib/seeds/suspicious_hosts.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
130.211.129.106
148.251.238.178
176.9.46.6
178.63.107.226
54.173.72.127
54.174.10.182
54.183.64.54
54.194.231.211
54.66.214.167
54.66.220.137
54.67.33.14
54.77.251.214
54.94.195.96
54.94.200.247
83.81.130.26
88.198.17.7

0 comments on commit e1c582c

Please sign in to comment.