Repository navigation
Releases
macchanger-pro v2.0.0 - Proper Python Package
What's new in v2.0.0
This release converts macchanger_pro from a single monolithic script into a proper, installable Python package. Every component is now separated, typed, tested, and wired together with CI from day one.
Install
pip install macchanger-pro
pipx install macchanger-pro
Then run from anywhere:
sudo macchanger-pro -i eth0 --random
sudo macchanger-pro -i eth0 --restore
What changed from v1.0.0
| Area | v1.0.0 | v2.0.0 |
|---|---|---|
| Structure | Single script | Installable src-layout package |
| Install | Clone + run manually | `pip install macchanger-pro` |
| Modules | Monolithic | cli / core / system / errors |
| Tests | None | 10 test modules, 80% coverage gate |
| CI | None | 4-stage GitHub Actions pipeline |
| Python support | 3.8+ | 3.10, 3.11, 3.12, 3.13 (matrix tested) |
| Typing | Partial | Fully typed, mypy strict |
| Tooling | None | Makefile, Dockerfile, Ruff, pre-commit |
| Docs | Single README | README + CONTRIBUTING + SECURITY + CHANGELOG |
Backward compatibility
The top-level `macchanger_pro.py` wrapper still works exactly as before for anyone not using pip.
Full changelog
See CHANGELOG.md for the complete list of changes.
macchanger_pro v1.0.0: Safe & Production-Grade MAC Address Utility
🛡️ macchanger_pro v1.0.0
macchanger_pro is a secure, production-grade MAC address management utility for Linux systems written in Python. It replaces brittle, hardcoded scripts with a robust tool adhering to modern Linux networking standards (iproute2), defensive programming principles, and safe backup-and-restore workflows.
✨ Key Features & Highlights
- Dynamic Interface Discovery: Automatically enumerates active network interfaces without requiring hardcoded adapter names.
- Modern
iproute2Backend: Uses nativeip linkoperations for dependable interface management with fallback mechanisms. - Automated MAC Backup & Instant Restore: Safely archives original hardware MACs to
/var/lib/macchanger/<iface>.origon first modification, ensuring all changes are 100% reversible. - Standards-Compliant Random MAC Generator: Generates valid Locally Administered Addresses (LAA) with the unicast bit set to avoid multicast and routing issues.
- Strict Format Validation: Enforces canonical hex formatting (
AA:BB:CC:DD:EE:FF) to prevent invalid network states. - Non-Interactive & Lab Friendly: Fully supports
-y/--yesflags for automated scripts, CI pipelines, and security labs. - Interactive Fallback: Step-by-step interactive CLI for manual usage when flags are omitted.
📦 Prerequisites
- Operating System: Linux (Kali Linux, Ubuntu, Debian, Arch, Fedora)
- Python Version: Python 3.8+
- Privileges: Root access (
sudo)
🚀 Quick Start
# Clone the repository
git clone https://github.com/SagarBiswas-MultiHAT/MAC-Changer.git
cd macchanger_pro
# Make executable
chmod +x macchanger_pro.py
# 1. List available network interfaces
sudo python3 macchanger_pro.py --list
# 2. View current interface MAC
sudo python3 macchanger_pro.py -i eth0 --show
# 3. Apply a random, standards-compliant MAC
sudo python3 macchanger_pro.py -i eth0 --random
# 4. Restore original hardware MAC
sudo python3 macchanger_pro.py -i eth0 --restore