my half-arsed attempt at blogging
Posts tagged Apple
arpinfo
May 20th
Ever wanted to know who the OEM/Supplier/Manufacturer of network devices attached to a machine were?
I did. And couldn’t see anyone else’s script to steal, so here’s a really ugly way to do it
# arpinfo:
# pull hardware info from the arp() table
#
# Copyright (c) 2010 Adam McGreggor. Some rights reserved.
# Email:
#
# $Id:$
#
WEBSOURCE=http://standards.ieee.org/regauth/oui/oui.txt
DOC=/usr/local/doc/oui.txt
curl --silent ${WEBSOURCE} -o "${DOC}"
arp | awk '{print $3}' | awk -F: '{print $1"-"$2"-"$3}' | while read ARP
do
grep $ARP ${DOC}
done
arp
Works for me… although it could do with a tidy-up. As a quick and dirty thing, mind…
