ββββ ββββ ββββββ βββββββ ββββββββββ βββ ββββββ ββββ βββ βββββββ βββββββββββββββ
βββββ βββββββββββββββββββββ βββββββββββ ββββββββββββββββ βββββββββββ ββββββββββββββββ
ββββββββββββββββββββββ βββ ββββββββββββββββββββββ ββββββ ββββββββββ ββββββββ
ββββββββββββββββββββββ βββ βββββββββββββββββββββββββββββ βββββββββ ββββββββ
βββ βββ ββββββ βββββββββββ βββββββββββ ββββββ ββββββ ββββββββββββββββββββββββββ βββ
βββ ββββββ βββ βββββββ ββββββββββ ββββββ ββββββ βββββ βββββββ βββββββββββ βββ
Advanced MAC Address Changer with Auto-Reconnect Feature
- Overview
- Features
- Requirements
- Installation
- Usage
- Project Structure
- How It Works
- Screenshots
- Troubleshooting
- Contributing
- License
- Author
- Disclaimer
MAC Changer Pro is a powerful, professional-grade Python tool designed for Linux systems that allows users to change their network interface MAC addresses with ease. It features an intuitive menu-driven interface, automatic network reconnection, network scanning capabilities, and MAC address cloning from discovered devices.
This tool is ideal for penetration testers, security researchers, privacy-conscious users, and network administrators who need to modify MAC addresses for legitimate purposes such as testing, research, or privacy protection.
- π MAC Address Modification: Change MAC addresses for any network interface
- π Network Scanning: Scan local network to discover connected devices using
arp-scan - π MAC Cloning: Clone MAC addresses from discovered network devices
- π Manual Entry: Set custom MAC addresses manually
- π Auto-Reconnect: Automatic NetworkManager restart and reconnection after MAC change
- πΎ Backup & Restore: Save original MAC address and restore it when needed
- π Network Information: Display IP, subnet, gateway, and DNS information
- π Logging: Comprehensive logging of all operations
- π¨ Colorful UI: Beautiful, colorful command-line interface
- β‘ Real-time Progress: Live progress indicators during network scanning
- π‘οΈ Error Handling: Robust error handling with retry mechanisms
- π Root Privilege Management: Automatic sudo handling for privileged operations
- Operating System: Linux (Kali Linux, Ubuntu, Debian, etc.)
- Python: 3.6 or higher
- Privileges: Root/sudo access
# Python packages
pip3 install colorama tabulate
# System packages (Debian/Ubuntu/Kali)
sudo apt-get install arp-scan network-manager# Clone the repository
git clone https://github.com/Rootx202/MAC-Changer-Pro.git
# Navigate to the directory
cd MAC-Changer-Pro
# Install Python dependencies
pip3 install -r requirements.txt
# Make the script executable
chmod +x main.py- Download the source code
- Extract to your preferred directory
- Install dependencies:
pip3 install colorama tabulate sudo apt-get install arp-scan network-manager
# Run with sudo privileges (required)
sudo python3 main.py-
Launch the Tool
sudo python3 main.py
-
Select Network Interface
- The tool will display all available network interfaces
- Enter the number corresponding to your desired interface
-
Choose an Option
- Option 1: Scan network and clone a device's MAC address
- Option 2: Restore original MAC address
- Option 3: Enter a custom MAC address manually
- Option 4: Select a different network interface
- Option 5: Exit the program
-
Network Scanning (Option 1)
- The tool will scan the local network for connected devices
- Select a device from the list to clone its MAC address
- The tool will automatically change your MAC and reconnect
-
Manual MAC Entry (Option 3)
- Enter a MAC address in format:
XX:XX:XX:XX:XX:XX - Example:
00:11:22:33:44:55
- Enter a MAC address in format:
-
Restore Original MAC (Option 2)
- Restores the MAC address that was saved when you first started
$ sudo python3 main.py
[*] Available interfaces:
1. eth0
2. wlan0
[*] Select interface number: 2
[*] Current MAC: aa:bb:cc:dd:ee:ff
[*] Options:
1. Scan network and clone device MAC
2. Restore original MAC
3. Change MAC manually
4. Select different interface
5. Exit
[*] Enter your choice: 1
[*] Scanning network...
[+] Found: 192.168.1.1 - 00:11:22:33:44:55 - TP-Link Router
[+] Found: 192.168.1.100 - 66:77:88:99:aa:bb - Samsung Device
[*] Select device number to clone: 1
[*] Attempting to clone MAC: 00:11:22:33:44:55
[β] MAC address changed successfully!
[β] Network services restarted, device reconnected.MAC-Changer-Pro/
β
βββ main.py # Main application entry point
β
βββ model/ # Data models and configurations
β βββ __init__.py
β βββ constants.py # Application constants and configurations
β βββ data_manager.py # MAC address data persistence
β βββ logger.py # Logging functionality
β
βββ core/ # Core functionality modules
β βββ __init__.py
β βββ banner.py # Application banner display
β βββ interface_operations.py # Network interface operations
β βββ mac_operations.py # MAC address change operations
β βββ network_operations.py # Network scanning and info display
β
βββ README.md # This file
βββ requirements.txt # Python dependencies
βββ LICENSE # License file
- constants.py: Stores application-wide constants (version, author, file paths)
- data_manager.py: Handles saving and loading original MAC addresses
- logger.py: Manages logging of all operations to file
- banner.py: Displays the application banner and branding
- interface_operations.py: Lists interfaces and retrieves current MAC addresses
- network_operations.py: Network scanning, device discovery, and network info display
- mac_operations.py: Core MAC changing logic with auto-reconnect functionality
-
Stop Network Services
- Stops NetworkManager and wpa_supplicant
-
Bring Interface Down
sudo ip link set dev <interface> down
-
Change MAC Address
sudo ip link set dev <interface> address <new_mac>
-
Bring Interface Up
sudo ip link set dev <interface> up
-
Restart Network Services
- Starts NetworkManager and wpa_supplicant
- Reconnects using
nmcli
-
Verification
- Verifies the MAC address was changed successfully
- Retries up to 3 times if needed
Uses arp-scan to discover devices on the local network:
sudo arp-scan -l -I <interface>Parses the output to extract IP addresses, MAC addresses, and vendor information.
Coming soon - Add screenshots of the tool in action
Issue: Permission denied errors
Solution: Run the script with sudo
$ sudo python3 main.py
Issue: ModuleNotFoundError
Solution: Install required Python packages
$ pip3 install colorama tabulate
Issue: arp-scan not found
Solution: Install arp-scan
$ sudo apt-get install arp-scan
Issue: MAC address doesn't change
Solution:
- Ensure you have root privileges
- Check if the interface supports MAC changing
- Try disabling NetworkManager's MAC randomization
Issue: Network doesn't reconnect after MAC change
Solution:
- Manually reconnect: nmcli device connect <interface>
- Check NetworkManager status: systemctl status NetworkManager
- Restart NetworkManager: sudo systemctl restart NetworkManager
To see detailed error messages, check the log file:
cat ~/.mac_tool.logContributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow PEP 8 style guidelines
- Add comments for complex logic
- Test your changes thoroughly
- Update documentation as needed
This project is licensed under the MIT License - see the LICENSE file for details.
RootX
IMPORTANT: This tool is intended for educational purposes, authorized security testing, and legitimate network administration only.
- Authorized Use Only: Only use this tool on networks and devices you own or have explicit permission to test
- Compliance: Ensure compliance with all applicable laws and regulations in your jurisdiction
- No Warranty: This software is provided "as is" without warranty of any kind
- Liability: The author is not responsible for any misuse or damage caused by this tool
By using this tool, you agree to:
- Use it only for legal and ethical purposes
- Obtain proper authorization before testing networks
- Respect privacy and security of others
- Comply with all applicable laws and regulations
Unauthorized access to computer networks is illegal and punishable by law.
- Python community for excellent libraries
- NetworkManager and arp-scan developers
- Colorama and Tabulate library creators
- Linux community for robust networking tools
If you encounter any issues or have questions:
- Check the Troubleshooting section
- Review existing Issues
- Open a new issue with:
- Your OS and version
- Python version
- Steps to reproduce the problem
- Error messages or logs
Made with β€οΈ by RootX
If you found this project helpful, please give it a β!