mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
Merge #17823: scripts: Read suspicious hosts from a file instead of hardcoding
e1c582cbaa4c094d204da34c3b1fdd0d4c557519 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: ACK e1c582cbaa4c094d204da34c3b1fdd0d4c557519 -- diff looks correct Tree-SHA512: 18684abc1c02cf52d63f6f6ecd98df01a9574a7c470524c37e152296504e2e3ffbabd6f3208214b62031512aeb809a6d37446af82c9f480ff14ce4c42c98e7c2
This commit is contained in:
parent
038eae1b4b
commit
8c6fb5622d
@ -19,8 +19,9 @@ MAX_SEEDS_PER_ASN=4
|
|||||||
|
|
||||||
# These are hosts that have been observed to be behaving strangely (e.g.
|
# These are hosts that have been observed to be behaving strangely (e.g.
|
||||||
# aggressively connecting to every node).
|
# aggressively connecting to every node).
|
||||||
SUSPICIOUS_HOSTS = {
|
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_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+)$")
|
PATTERN_IPV6 = re.compile(r"^\[([0-9a-z:]+)\]:(\d+)$")
|
||||||
|
0
contrib/seeds/suspicious_hosts.txt
Normal file
0
contrib/seeds/suspicious_hosts.txt
Normal file
Loading…
Reference in New Issue
Block a user