Skip to content

Commit

Permalink
Merge pull request #50 from tamihiro/new-pr-batch-2
Browse files Browse the repository at this point in the history
Prevent 4-byte AS capability from being treated like it is ASN
  • Loading branch information
zorun committed Aug 28, 2019
2 parents 8596390 + 822d54c commit 0e9dcd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lg.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def add_links(text):
ret_text.append(re.sub(r'(\d+)', r'<a href="/whois?q=\1" class="whois">\1</a>', line))
else:
line = re.sub(r'([a-zA-Z0-9\-]*\.([a-zA-Z]{2,3}){1,2})(\s|$)', r'<a href="/whois?q=\1" class="whois">\1</a>\3', line)
line = re.sub(r'AS(\d+)', r'<a href="/whois?q=\1" class="whois">AS\1</a>', line)
line = re.sub(r'(?<=\[)AS(\d+)', r'<a href="/whois?q=\1" class="whois">AS\1</a>', line)
line = re.sub(r'(\d+\.\d+\.\d+\.\d+)', r'<a href="/whois?q=\1" class="whois">\1</a>', line)
if len(request.path) >= 2:
hosts = "/".join(request.path.split("/")[2:])
Expand Down

0 comments on commit 0e9dcd7

Please sign in to comment.