mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
Merge #17823: scripts: Read suspicious hosts from a file instead of hardcoding
e1c582cbaa
contrib: makeseeds: Read suspicious hosts from a file instead of hardcoding (Sanjay K) Pull request description: referring to: https://github.com/bitcoin/bitcoin/issues/17020 good first issue: reading SUSPICIOUS_HOSTS from a file. I haven't changed the base hosts that were included in the original source, just made it readable from a file. ACKs for top commit: practicalswift: ACKe1c582cbaa
-- diff looks correct Tree-SHA512: 18684abc1c02cf52d63f6f6ecd98df01a9574a7c470524c37e152296504e2e3ffbabd6f3208214b62031512aeb809a6d37446af82c9f480ff14ce4c42c98e7c2
This commit is contained in:
commit
7e841f3f9b
2 changed files with 19 additions and 7 deletions
|
@ -19,13 +19,9 @@ MIN_BLOCKS = 337600
|
|||
|
||||
# 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+)$")
|
||||
|
|
16
contrib/seeds/suspicious_hosts.txt
Normal file
16
contrib/seeds/suspicious_hosts.txt
Normal file
|
@ -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
|
Loading…
Add table
Reference in a new issue