跳转到主要内容

为arpwatch获取和生成ethercodes数据

项目描述

摘要

为arpwatch获取和生成ethercodes数据。

描述

从IEEE.org获取当前IEEE MA-L分配文件(oui.csv),并为arpwatch生成ethercodes.dat。

仅获取oui.csv,如果时间戳较新(除非指定了--force)。类似地,如果时间戳不匹配,则仅生成ethercodes.dat(再次,除非指定了--force)。使用选项--keep从现有的oui.csv(重新)生成ethercodes.dat。

注意

oui.csv的时间戳在2秒范围内波动(!). 因此,通过考虑时间差容差因子来补偿波动。

用法

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数据库。

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于安装软件包的信息。

源分布

fetch-ethercodes-0.5.tar.gz (6.8 kB 查看哈希值)

上传时间:

构建分布

fetch_ethercodes-0.5-py2.py3-none-any.whl (6.6 kB 查看哈希值)

上传时间 Python 2 Python 3

由以下支持

AWSAWS云计算和安全赞助商DatadogDatadog监控FastlyFastlyCDNGoogleGoogle下载分析MicrosoftMicrosoftPSF赞助商PingdomPingdom监控SentrySentry错误记录StatusPageStatusPage状态页面