OUI Finder (24 of 30)

I have been looking into doing some simple scripts based on a a post on reddit, this the first one. The idea is simple, query a switch and alert if you find an oui you don’t want (e.g. netgear, linksys, etc.) I wanted to write the code a bit cleaner, but ran into a few issues, and didn’t have the time. It is functional (on cisco at least) and the alert is only set to print for now, but it is in a function and can be easily changed to do what you want with it.

Just update your community and OUI lookup.

#update community
my $community = ‘public’;

#update Vendor lookups:
my @checkoui = ();
push @checkoui, ‘Netgear’;
push @checkoui, ‘Flextronics’;

It performs an API call for the actual oui lookup and then does a liberal match, since the out vendor names aren’t that standard, even within the same vendor.

Here is a quick output of what it does:

oui

You can find the code here:

 

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>