Changeset View
Changeset View
Standalone View
Standalone View
contrib/seeds/makeseeds.py
Show All 30 Lines | |||||
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 | ||||
# BCH/UAHF specification. | # BCH/UAHF specification. | ||||
PATTERN_AGENT = re.compile(r"^(/Bitcoin ABC:0.(22|23).(\d+)\(.+\)/)") | PATTERN_AGENT = re.compile(r"^(/Bitcoin ABC:0.(23|24).(\d+)\(.+\)/)") | ||||
def parseline(line): | def parseline(line): | ||||
sline = line.split() | sline = line.split() | ||||
if len(sline) < 11: | if len(sline) < 11: | ||||
return None | return None | ||||
# The user agent is at the end of the line. It may contain space, so we | # The user agent is at the end of the line. It may contain space, so we | ||||
▲ Show 20 Lines • Show All 167 Lines • Show Last 20 Lines |