Look up MAC addresses for their vendor in the IEEE OUI database
The data used in this module comes from the Sanitized IEEE OUI Data which is updated once a week on Sunday. The module is able self-update the data on user request. It's also possible to use the more frequently updated original IEEE source when preferred.
$ npm install --save ouivar oui = require('oui');
console.log(oui('20:37:06:12:34:56'));
//=> Cisco Systems, Inc
//=> 80 West Tasman Drive
//=> San Jose CA 94568
//=> United States
console.log(oui.search('*Juniper Systems*'))
//=> [
//=> {
//=> oui: '0C0535',
//=> organization: 'Juniper Systems\n1132 W. 1700 N.\nLogan UT 84321\nUnited States'
//=> }
//=> ]$ npm install -g oui$ oui 20:37:06:12:34:56
Cisco Systems, Inc
80 West Tasman Drive
San Jose CA 94568
United States$ echo 203706 | oui
Cisco Systems, Inc
80 West Tasman Drive
San Jose CA 94568
United States$ oui --search cisco theory
OUI ORGANZATION ADDRESS COUNTRY
000C41 Cisco-Linksys LLC 121 Theory Dr. Irvine CA 92612
000F66 Cisco-Linksys LLC 121 Theory Dr. Irvine CA 92612
001217 Cisco-Linksys LLC 121 Theory Dr. Irvine CA 92612
001310 Cisco-Linksys LLC 121 Theory Dr. Irvine CA 92612
...To update the local OUI database:
$ oui --updateOr from the original IEEE source (slow):
$ oui --update http://standards.ieee.org/develop/regauth/oui/oui.txtinputstring: The input string. Non-hexadecimal characters and characters after 6 hex characters are found are ignored unlessoptions.strictis set.optionsObject: A optional options object.strictboolean: Whentrue, only strict input formats will be accepted. Will throw an error when an invalid format is supplied.filestring: A absolute file path tooui.json, which contains the parsed oui data. Defaults to theoui.jsonin the module directory.
Returns: Either a string, or null if no matches are found. Throws if input is not a string.
optionsObject: A optional options object.urlstring: The URL from where to retrieveoui.txt. Defaults to'http://linuxnet.ca/ieee/oui.txt'. To use the more inconsistent and slower to download original file from IEEE, use'http://standards.ieee.org/develop/regauth/oui/oui.txt'.filestring: A absolute file path foroui.json, which is used to store the parsed oui data. Defaults to. Defaults to theoui.jsonin the module directory.
Returns: A Promise that indicates when the internal database has been updated. Rejects on error.
patternsstring/Array: One or more wildcard patterns to search the vendor data, as suppored by minimatch.optionsObject: A optional options object.fileString: A absolute file path foroui.json, which is used to store the parsed oui data. Defaults to. Defaults to theoui.jsonin the module directory.- All minimatch options are supported as well.
Returns a array of objects in the format {oui, organization}.
00000000:00:0000-00-000000000000000000.0000.000000:00:00:00:00:0000-00-00-00-00-00
© silverwind, distributed under BSD licence