PHPackages                             vsc55/mac-address - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. vsc55/mac-address

ActiveLibrary

vsc55/mac-address
=================

Get, validate and generate MAC addresses.

2.1.5(4y ago)05MITPHPPHP &gt;=5.3.2

Since May 19Pushed 4y agoCompare

[ Source](https://github.com/vsc55/php-mac-address)[ Packagist](https://packagist.org/packages/vsc55/mac-address)[ RSS](/packages/vsc55-mac-address/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (7)Used By (0)

PHP MAC Address
===============

[](#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.

Capabilities
------------

[](#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
-----

[](#usage)

```
// require the class
require_once './src/BlakeGardner/MacAddress.php';

// import the class
use BlakeGardner\MacAddress;

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

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

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

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

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

// 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";
```

For more see the example.php file. You can run the example on the command line as root. `php example.php`

Planned Features
----------------

[](#planned-features)

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

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~776 days

Total

5

Last Release

1634d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/38e242396854cf2fb09b24b583e3034ca56d6ecb3bdc81e12d9b0f3ca46e27ee?d=identicon)[vsc55](/maintainers/vsc55)

---

Top Contributors

[![BlakeGardner](https://avatars.githubusercontent.com/u/810889?v=4)](https://github.com/BlakeGardner "BlakeGardner (1 commits)")[![vsc55](https://avatars.githubusercontent.com/u/13438676?v=4)](https://github.com/vsc55 "vsc55 (1 commits)")

---

Tags

addressunixIPlinuxMACifconfigDHCP

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/vsc55-mac-address/health.svg)

```
[![Health](https://phpackages.com/badges/vsc55-mac-address/health.svg)](https://phpackages.com/packages/vsc55-mac-address)
```

###  Alternatives

[jolicode/jolinotif

Send desktop notifications on Windows, Linux, MacOS.

1.4k11.6M41](/packages/jolicode-jolinotif)[mlocati/ip-lib

Handle IPv4, IPv6 addresses and ranges

3126.4M44](/packages/mlocati-ip-lib)[markrogoyski/ipv4-subnet-calculator

Network calculator for subnet mask and other classless (CIDR) network information.

177813.7k6](/packages/markrogoyski-ipv4-subnet-calculator)[devium/processes

This package is used to get a list of running processes on Windows or Unix-like systems, even Darwin

2427.5k](/packages/devium-processes)[lbaey/chromedriver

Utility for installing Chromedriver, whatever platform you are on, for use with Behat

1459.5k1](/packages/lbaey-chromedriver)[davidepastore/slim-restrict-route

A Slim middleware to restrict ip addresses that will access to your routes

2220.6k1](/packages/davidepastore-slim-restrict-route)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
