获取并生成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数据库。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
通过在安卓手机中更改日期来更改java日期和时间   使用ByteBuffer性能比较在通道上执行java I/O操作   java在websphere中将响应代码403替换为404   java如何验证HQL在语法上是否正确(不执行它)?   java如何在线程中创建TextView?   php nohup:忽略输入并将输出附加到'nohup'。出局   java Android微调器增量数   java如何禁用移动版网站?   java对象上的超类如何工作?   使用Java将JSON文件从本地驱动器上传到BigQuery   java无竞争条件:两个具有不同锁但共享数据相同的块   java无法理解为什么我的程序不打印数组的内容   java如何在MySQL中创建临时过程?   java JasperReports在以pdf格式导出时不维护字体   java向gradle构建添加库