I’m doing some quick work on the arp-scan-rs crate, to convert it from a cli app to cli + library so that its scans can be performed programatically. It basically uses arp to find and identify devices on your local network.
I noticed that its database of vendors used a very limited version of the IEEE oui database. That got me to thinking, wouldn’t it be nice to have a way to easily get a copy of the latest database?
So I sketched out what that might look like. Basically, request the path to the locally cached database. If the file doesn’t exist, download it in situ. I spent a couple nights putting together IEEE-Registry, which should work as advertised.
|
|
To get a copy of the database programatically, it’s as simple as:
|
|
or run the included binary:
$ ieee-registry Caching IEEE registry file(s)... ✔ /home/user/.local/share/ieee/cid.csv ✔ /home/user/.local/share/ieee/eth.csv ✔ /home/user/.local/share/ieee/iab.csv ✔ /home/user/.local/share/ieee/mam.csv ✔ /home/user/.local/share/ieee/man.csv ✔ /home/user/.local/share/ieee/opid.csv ✔ /home/user/.local/share/ieee/oui.csv ✔ /home/user/.local/share/ieee/oui36.csv
oui_path now points to ~/.local/share/ieee/oui.csv, which can then be parsed and used to lookup the vendor of found ethernet devices. My arp-scan went from no vendors detected to almost 90% found.