Initial commit: mwhois with SCION AS support and decimal AS conversion

Based on mwhois by Antonios A. Chariton
Modifications for SCION AS support by Olaf Baumert, Axpo Systems AG
This commit is contained in:
Olaf Baumert
2025-06-03 11:01:02 +00:00
commit 34c631a06d
340 changed files with 212460 additions and 0 deletions

View File

@@ -0,0 +1,56 @@
=IEEE Publish/Subscribe Parser Tests=
Copyright (c) 2008-2015, David P. D. Moss. All rights reserved.
Basic OUIIndexParser and FileIndexer object tests.
{{{
>>> from netaddr.eui.ieee import OUIIndexParser, IABIndexParser, FileIndexer
>>> from io import StringIO
>>> infile = StringIO()
>>> outfile = StringIO()
>>> infile.write("""
... 00-CA-FE (hex) ACME CORPORATION
... 00CAFE (base 16) ACME CORPORATION
... 1 MAIN STREET
... SPRINGFIELD
... UNITED STATES
... """)
211
>>> infile.seek(0)
0
>>> iab_parser = OUIIndexParser(infile)
>>> iab_parser.attach(FileIndexer(outfile))
>>> iab_parser.parse()
>>> print(outfile.getvalue())
51966,1,210
<BLANKLINE>
}}}
Basic IABIndexParser and FileIndexer object tests.
{{{
>>> infile = StringIO()
>>> outfile = StringIO()
>>> infile.write("""
... 00-50-C2 (hex) ACME CORPORATION
... ABC000-ABCFFF (base 16) ACME CORPORATION
... 1 MAIN STREET
... SPRINGFIELD
... UNITED STATES
... """)
182
>>> infile.seek(0)
0
>>> iab_parser = IABIndexParser(infile)
>>> iab_parser.attach(FileIndexer(outfile))
>>> iab_parser.parse()
>>> print(outfile.getvalue())
84683452,1,181
<BLANKLINE>
}}}