Changeset View
Changeset View
Standalone View
Standalone View
contrib/seeds/makeseeds.py
Show All 26 Lines | |||||
import dns.resolver | import dns.resolver | ||||
import collections | import collections | ||||
PATTERN_IPV4 = re.compile( | PATTERN_IPV4 = re.compile( | ||||
r"^((\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})):(\d+)$") | 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+)$") | ||||
PATTERN_ONION = re.compile( | PATTERN_ONION = re.compile( | ||||
r"^([abcdefghijklmnopqrstuvwxyz234567]{16}\.onion):(\d+)$") | r"^([abcdefghijklmnopqrstuvwxyz234567]{16}\.onion):(\d+)$") | ||||
# Used to only select nodes with a user agent string compatible with the | # Used to only select nodes with a user agent string compatible with the | ||||
# BCC/UAHF specification. | # BCC/UAHF specification. | ||||
PATTERN_AGENT = re.compile( | PATTERN_AGENT = re.compile( | ||||
r"^(/BitcoinABC:0.14.(4|5|6|7)\(\S+\)/|/BitcoinXT:0.11.0G\(\S+\)/|/BUCash:1.1.0\(\S+\)/|/Classic:1.3.1\(\S+\)/)") | r"^(/BitcoinABC:0.15.(\d+)\(\S+\)/|/BitcoinXT:0.11.0G\(\S+\)/|/BUCash:1.1.0\(\S+\)/|/Classic:1.3.(\d+)\(\S+\)/)") | ||||
sickpig: BUCash:1.1.0 and also 1.1.1 | |||||
def parseline(line): | def parseline(line): | ||||
sline = line.split() | sline = line.split() | ||||
if len(sline) < 11: | if len(sline) < 11: | ||||
return None | return None | ||||
# All BCC clients apart BU and Classic has a space in the useragent string | # All BCC clients apart BU and Classic has a space in the useragent string | ||||
if len(sline) == 13: | if len(sline) == 13: | ||||
▲ Show 20 Lines • Show All 149 Lines • Show Last 20 Lines |
BUCash:1.1.0 and also 1.1.1