The MAC Address Changer Tool is a Python-based utility designed to view and modify the MAC address of your network interface. This tool supports generating random MAC addresses or entering a custom MAC address. It operates on Linux-based systems and utilizes the ifconfig command for network interface management.
- Print Current MAC Address: Display the current MAC address of the
eth0network interface. - Change MAC Address: Modify the MAC address using either randomly generated or custom MAC addresses.
- Operating System: Linux-based (e.g., Kali Linux, Ubuntu).
- Utilities:
ifconfigfrom thenet-toolspackage.
-
Clone the Repository
First, clone the repository to your local machine:
git clone https://github.com/AbdullahZeynel/python-MAC-changer.git
-
Navigate to the Project Directory
Change into the project directory:
cd python-MAC-changer -
Install Dependencies
Ensure that
ifconfigis installed on your system. You can install it by running:sudo apt-get update sudo apt-get install net-tools
-
Run the Tool
Execute the script using Python:
python3 mac_changer.py
-
Main Menu Options
The tool will present a menu with the following options:
- Print Current MAC Address: Displays the current MAC address of
eth0. - Change MAC Address:
- Generate New MAC Address: Creates and displays five random MAC addresses.
- Enter Custom MAC Address: Prompts you to manually enter a MAC address to apply.
- Print Current MAC Address: Displays the current MAC address of
-
Generated MAC Addresses Menu
After generating MAC addresses, you can:
- Regenerate MAC Addresses: Produce a new set of MAC addresses.
- Select and Apply a MAC Address: Choose one of the displayed MAC addresses to apply.
************************************************************************
** MAC Address Changer Tool **
************************************************************************
Please select an option:
1. Print Current MAC Address
2. Change MAC Address
3. Exit************************************************************************
** Change MAC Address **
************************************************************************
Please select an option:
1. Generate New MAC Address
2. Enter Custom MAC Address************************************************************************
** Generated MAC Addresses **
************************************************************************
MAC_1: 00:1A:2B:3C:4D:5E
MAC_2: 00:2B:3C:4D:5E:6F
...- MAC Address Format: The MAC address should be entered in the format
xx:xx:xx:xx:xx:xx, where the first character must be0and the second character must be one of0,2,4,6,8,A,C,E. - Network Interface: This tool currently assumes the network interface is named
eth0. If your interface is different, you will need to modify the script accordingly.
- Error: Cannot assign requested address: Ensure that the MAC address format is correct and that the network interface
eth0is correctly specified. - Error: Invalid input: Verify that you are entering valid options and that any MAC addresses follow the required format.
Contributions are welcome! If you have suggestions or improvements, please fork the repository and submit a pull request. For major changes, open an issue to discuss the proposed modifications first.