PHP Classes

PHP Mac Address Lookup: Look up a hardware vendor for a device Mac address

Recommend this page to a friend!
  Info   View files Documentation   View files View files (36)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 63 This week: 1All time: 10,388 This week: 560Up
Version License PHP version Categories
mac-vendor-lookup 1.0MIT/X Consortium ...5PHP 5, Web services, Hardware
Description 

Author

This package can look up a hardware vendor for a device Mac address.

It provides classes that can access the IEEE and OUI Web services to query the vendor and other technical details for a given Mac address.

The package provides the script files that perform queries about the Mac address from the command line console using the Laravel Artisan tool.

Picture of Angel Campos
Name: Angel Campos <contact>
Classes: 8 packages by
Country: Spain Spain
Age: ???
All time rank: 3781101 in Spain Spain
Week rank: 416 Up14 in Spain Spain Up
Innovation award
Innovation award
Nominee: 4x

Documentation

mac-vendor-lookup

<p align="center">

StyleCI

</p>

<p>This PHP package allows you to get the information related to an <abbr title="Institute of Electrical and Electronics Engineers">IEEE</abbr> <abbr title="Organizationally Unique Identifier">OUI</abbr> assignment from a Laravel application.</p>

<p>The <strong>mac-vendor-lookup</strong> package downloads the OUI mapping information in <abbr title="Comma Separated Values">CSV</abbr> format from the IEEE website. Then it processes the CSV files and later stores the OUI assignment details in tables in the database.</p>

Install

You can install the package via composer:

composer require acamposm/mac-vendor-lookup

Then publish the assets with this command:

php artisan mac:install

After publishing the assets (config & migrations), run artisan migrate:

php artisan migrate

Usage

Get MAC Address details

You can use "php artisan mac: details <mac-address>" in the console to get the vendor details as well as the OUI assignment details.

php artisan mac:details  <mac-address>

php artisan mac:details  00-15-5D-81-E0-B0

 Vendor details
 ------------- ---------------------------------------------
  OUI           00155D
  MAC Address   00-15-5D-81-E0-B0
  Vendor        Microsoft Corporation
  Address       One Microsoft Way Redmond WA US 98052-8300
  Is Private    false
 ------------- ---------------------------------------------

 Block details
 ------------------- -------------------
  Registry            MA-L
  Assignment bits     2^24
  Block Size          16,777,216
  Lower MAC Address   00:15:5D:00:00:00
  Upper MAC Address   00:15:5D:FF:FF:FF
  Last Update         Unknown
 ------------------- -------------------

 MAC Address details
 --------------------- ----------------------------------------
  MAC Address           00-15-5D-81-E0-B0
  Administration byte   UAA (Universally Administered Address)
  Group byte            Individual address
  Virtual Machine       true
  Is Multicast          false
  Is Unicast            false
  Is Valid              true
 --------------------- ----------------------------------------

Get vendor details

You can use "php artisan mac:vendor <mac-address>" in the console to get the vendor details associated with the OUI assignment.

php artisan mac:vendor <mac-address>

php artisan mac:vendor 00-15-5D-81-E0-B0

 ------------- -----------------------
  OUI           00155D
  MAC Address   00-15-5D-81-E0-B0
  Vendor        Microsoft Corporation
  Registry      MA-L
 ------------- -----------------------

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Thank you for considering contributing to the improvement of the package. Please see CONTRIBUTING for details.

Security Vulnerabilities

If you discover any security related issues, please send an e-mail to Angel Campos via angel.campos.m@outlook.com instead of using the issue tracker. All security vulnerabilities will be promptly addressed.

Credits

License

The package Ping is open-source package and is licensed under The MIT License (MIT). Please see License File for more information.


  Files folder image Files  
File Role Description
Files folder image.github (4 files)
Files folder imageconfig (1 file)
Files folder imagedatabase (1 directory)
Files folder imagesrc (3 files, 4 directories)
Files folder imagestorage (1 directory)
Files folder imagetests (1 file, 1 directory)
Accessible without login Plain text file .phpunit.result.cache Data Auxiliary data
Accessible without login Plain text file .styleci.yml Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  .github  
File Role Description
  Accessible without login Plain text file CODE_OF_CONDUCT.md Data Auxiliary data
  Accessible without login Plain text file CONTRIBUTING.md Data Auxiliary data
  Accessible without login Plain text file dependabot.yml Data Auxiliary data
  Accessible without login Plain text file FUNDING.yml Data Auxiliary data

  Files folder image Files  /  config  
File Role Description
  Accessible without login Plain text file ieee.php Aux. Auxiliary script

  Files folder image Files  /  database  
File Role Description
Files folder imagemigrations (4 files)

  Files folder image Files  /  database  /  migrations  
File Role Description
  Plain text file 2020_08_27_171403_...signments_table.php Class Class source
  Plain text file 2020_08_27_173200_...oui_files_table.php Class Class source
  Plain text file 2020_08_29_171728_...tatistics_table.php Class Class source
  Plain text file 2020_08_29_171942_...i_updates_table.php Class Class source

  Files folder image Files  /  src  
File Role Description
Files folder imageConsole (1 directory)
Files folder imageExceptions (2 files)
Files folder imageModels (1 file)
Files folder imageProviders (1 file)
  Plain text file MacAddress.php Class Class source
  Plain text file OuiFile.php Class Class source
  Plain text file OuiFileProcessor.php Class Class source

  Files folder image Files  /  src  /  Console  
File Role Description
Files folder imageCommands (7 files)

  Files folder image Files  /  src  /  Console  /  Commands  
File Role Description
  Plain text file DeleteOlderFilesCommand.php Class Class source
  Plain text file DownloadOuiFileFromIeeeWebPage.php Class Class source
  Plain text file GetMacAddressDetailsCommand.php Class Class source
  Plain text file GetVendorDetailsCommand.php Class Class source
  Plain text file InstallPackageCommand.php Class Class source
  Plain text file SeedTableFromOuiFile.php Class Class source
  Plain text file UpdateTableFromOuiFile.php Class Class source

  Files folder image Files  /  src  /  Exceptions  
File Role Description
  Plain text file InvalidMacAddressFormatException.php Class Class source
  Plain text file OuiFileNotFoundException.php Class Class source

  Files folder image Files  /  src  /  Models  
File Role Description
  Plain text file OuiAssignment.php Class Class source

  Files folder image Files  /  src  /  Providers  
File Role Description
  Plain text file MacVendorLookupServiceProvider.php Class Class source

  Files folder image Files  /  storage  
File Role Description
Files folder imageieee (5 files)

  Files folder image Files  /  storage  /  ieee  
File Role Description
  Accessible without login Plain text file oui_cid_20200830.csv Data Auxiliary data
  Accessible without login Plain text file oui_iab_20200830.csv Data Auxiliary data
  Accessible without login Plain text file oui_mal_20200830.csv Data Auxiliary data
  Accessible without login Plain text file oui_mam_20200830.csv Data Auxiliary data
  Accessible without login Plain text file oui_mas_20200830.csv Data Auxiliary data

  Files folder image Files  /  tests  
File Role Description
Files folder imageUnit (1 file)
  Accessible without login Plain text file Pest.php Test Test script

  Files folder image Files  /  tests  /  Unit  
File Role Description
  Accessible without login Plain text file ExampleTest.php Test Test script

 Version Control Unique User Downloads Download Rankings  
 100%
Total:63
This week:1
All time:10,388
This week:560Up