获取并生成arpwatch的ethercode数据
fetch-ethercodes的Python项目详细描述
摘要
获取并生成arpwatch的ethercode数据。
说明
从ieee.org获取当前的ieee ma-l分配文件(oui.csv)。 并生成ethercodes.dat以供arpwatch使用。
如果时间戳较新(除非给出--force),则仅获取oui.csv。 类似地,如果时间戳不匹配,则仅生成ethercodes.dat (同样,除非——给力)。使用选项--保持(重新)生成 来自现有OVI.CSV的EtAcCODES.DAT。
注释
oui.csv的时间戳在2秒内波动(!).因此 通过将deltat公差因子 帐户。
用法
Usage: fetch-ethercodes.py [-hVvfkt][-T sec][-O ouifile][-o outfile][-p spec]
-h, --help this message
-V, --version print version and exit
-v, --verbose verbose mode (cumulative)
-f, --force force operation
-k, --keep keep existing http://standards-oui.ieee.org/oui/oui.csv
-t, --timestamp print timestamp
-T, --deltat sec tolerance in timestamp comparison
(default: 2.5 sec.)
-O, --ouifile file IEEE.org host
(default: http://standards-oui.ieee.org/oui/oui.csv)
-o, --outfile file arpwatch ethercodes
(default: ethercodes.dat)
-p, --patch spec patch specfile with updated timestamp
示例运行
$ fetch-ethercodes.py -v
check http://standards-oui.ieee.org/oui/oui.csv
oui file size: 2264884
oui file date: Wed, 26 Sep 2018 08:06:13 GMT
no local file oui.csv found
fetch http://standards-oui.ieee.org/oui/oui.csv
no local file ethercodes.dat found
parse oui.csv
value 0:1:c8 exists already: "THOMAS CONRAD CORP.", "CONRAD CORP."
value 8:0:30 exists already: "NETWORK RESEARCH CORPORATION", "ROYAL MELBOURNE INST OF TECH"
value 8:0:30 exists already: "NETWORK RESEARCH CORPORATION", "CERN"
generate ethercodes.dat with 25433 entries
successful
timestamp: 20180926_080613
提供了一个附加工具query-ethercodes.py
,它允许查询
ethercodes.dat数据库。