If this is your first visit, be sure to
check out the Forum Rules by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

OUI (MAC address) lookup script

I couldn't find a tool in BackTrack 4 that allowed me to lookup OUIs (Organizationally Unique Identifier), so I decided to write one myself. Of course it could just be me and that I overlooked a tool already present in BackTrack to do this, in that case, please react on this post telling which tool.

The tool I wrote is a small Perl script that uses the OUI list of aircrack-ng located in /usr/local/etc/aircrack-ng/airodump-ng-oui.txt, the code of the tool is listed below together with some example outputs.
I have no idea if anyone else thinks this is useful, but I decided to post it here in case anyone can use it.

Re: OUI (MAC address) lookup script

Ah I like it. Much better than manually grepping for it and I can see some code changes in my scripts already.

On that note though, some slight improvements to the code - it happened to me so I'm passing on the knowledge. Some of it available here: Ancient Perl / Perl 5 Wiki and other bits just my experience in the past. I've cleaned up the sanitation code at the top, cut out the use of variables to help speed things up a little.

In terms of other tools I'm not familiar with any, I usually just grep the nmap OUI file if I need to look one up.

The formatting may have changed slightly (I use different tab stops), but here it is:

Re: OUI (MAC address) lookup script

Originally Posted by Gitsnik

On that note though, some slight improvements to the code - it happened to me so I'm passing on the knowledge. Some of it available here: Ancient Perl / Perl 5 Wiki and other bits just my experience in the past. I've cleaned up the sanitation code at the top, cut out the use of variables to help speed things up a little.

Autsj! Thanks for that, I have been writing Perl for years but always the same way since I learned it, I have read the link and will try to keep it in mind from now on

I adjusted the code a bit further to display different error messages in case it is installed in the bin directory instead of ran from command line with Perl. I further made some minor adjustments and placed the OUI file location at the beginning as a variable for easier adjustment for when someone would want to change this.