2017 © Pedro PelĂĄez
 

library mac-address

Get, validate and generate MAC addresses.

image

blake-gardner/mac-address

Get, validate and generate MAC addresses.

  • Thursday, May 30, 2013
  • by BlakeGardner
  • Repository
  • 8 Watchers
  • 43 Stars
  • 9,188 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 42 Forks
  • 2 Open issues
  • 5 Versions
  • 2 % Grown

The README.md

PHP MAC Address

This is a PHP class for MAC address manipulation on top of Unix, Linux and Mac OS X operating systems. it was primarily written to help with spoofing for wireless security audits., (*1)

Capabilities

  • Verify you are executing it from the command line
  • Verify you are running the script as an administrator
  • Generate new random MAC addresses
  • Validate MAC addresses
  • Get the current system’s MAC address
  • Set or “spoof” any MAC address you want

Usage

``` php // require the class require_once './src/BlakeGardner/MacAddress.php';, (*2)

// import the class use BlakeGardner\MacAddress;, (*3)

// get the mac address of the eth0 interface var_dump(MacAddress::getCurrentMacAddress('eth0'));, (*4)

// generate a random mac address var_dump(MacAddress::generateMacAddress());, (*5)

// validate an MAC address var_dump(MacAddress::validateMacAddress('00-B0-D0-86-BB-F7'));, (*6)

// set a randomly generated MAC address on the eth0 interface var_dump(MacAddress::setFakeMacAddress('eth0'));, (*7)

// set a specific MAC address on the eth0 interface var_dump(MacAddress::setFakeMacAddress('eth0', '00:E4:01:2C:79:DA'));, (*8)

// get the mac address of the eth0 interface using the ifconfig path that we define var_dump(MacAddress::getCurrentMacAddress('eth0', '/usr/local/sbin/ifconfig')); echo "\n"; ```, (*9)

For more see the example.php file. You can run the example on the command line as root. php example.php, (*10)

Planned Features

  • List all interfaces on the system
  • OS detection
  • Suppress errors on the command line

The Versions

30/05 2013

dev-master

9999999-dev

Get, validate and generate MAC addresses.

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

The Development Requires

by Blake Gardner

address ip mac ifconfig dhcp

30/05 2013

dev-develop

dev-develop

Get, validate and generate MAC addresses.

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

The Development Requires

by Blake Gardner

address ip mac ifconfig dhcp

30/05 2013

2.1.3

2.1.3.0

Get, validate and generate MAC addresses.

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

The Development Requires

by Blake Gardner

address ip mac ifconfig dhcp

20/05 2013

2.1.1

2.1.1.0

Get, validate and generate MAC addresses.

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

The Development Requires

by Blake Gardner

19/05 2013

2.1.0

2.1.0.0

Get, validate and generate MAC addresses.

  Sources   Download

MIT

The Requires

  • php >=5.3.2

 

by Blake Gardner