Mac Spoofer
Detailed Description
What is this project about?
This project focuses on building a Linux-based MAC Address Randomizer & Restorer Tool using Python. It can detect network interfaces, generate valid random MAC addresses, change the MAC address of selected interfaces, validate changes, and restore the original MAC address. The project helps learners understand MAC addressing, networking basics, system-level programming, and responsible security practices.
Skills this Project Covers
Python Programming, Linux Commands, Regex, Networking Basics, System-level Programming, Security Practice
Requirements
Core Requirements
Random MAC Address Generation
Generate valid MAC addresses (XX:XX:XX:XX:XX:XX)
Option for fully random or vendor-prefix MACs (optional)
Network Interface Detection
List available Linux interfaces (e.g., eth0, wlan0)
Allow user to select a target interface
MAC Address Changing
Bring interface down → apply MAC → bring interface up
Validate MAC format using regex
Verify if MAC was successfully changed
Backup & Restore
Automatically store the original MAC address
Provide a function to restore it
Verify restoration success
Linux Compatibility
Use commands like ifconfig (and optionally ip)
Handle common interface naming patterns
Technical Requirements
Python 3.x using:
subprocess for system commands
re for MAC validation
Must handle admin privileges (warn if not run with sudo)
Parse command outputs safely
Include unit tests for:
MAC generation
MAC validation
Backup & restore logic
System calls (mocked)