GithubHelp home page GithubHelp logo

ethernet_macvendor's Introduction

A combination or sed(1), gawk(1) and a C program for parsing Ethernet MAC addresses from a file and lookup the vendor of the chip

oui.sh is the driving script, it accepts 2 arguments, the 2nd is optional, the first is the file where the mac addresses are, and the second if it is "-d" it will use the httpoui.c http client to download the oui.txt from the IEEE. The oui.txt contain a list of OUI (3 octets) that list the vendor assignated to that OUI by the IEEE.

IF the file oui.txt doesn't exist and no "-d" parameter was passed then the script will use a gawk(1) socket to make an http request to download the file, if "-d" was passed the script will use make(1) to build the http client and use it to download the oui.txt file. After that sed(1) takes care to do some cleanups and then hand the data over to gawk(1) via a pipe(2) to continue filtering, finally after all is done the OUIs on the input mac file will be matched against the OUIs in the oui.txt file to find the vendor.

NOTE: this small hobby project is developed on FreeBSD 11.2 for that reason the http client in C might not build or work on any other unix-like OS since it make uses of at least one FreeBSD specific flag for getaddrinfo(2) I plan to fix this soon, it works, however in OpenBSD and NetBSD but not on Linux.

Orestes Leal Rodriguez, 2018 [email protected]

ethernet_macvendor's People

Contributors

orestesleal avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.