This repository provides tools to change or reset MAC addresses on different operating systems: Windows, Linux, and macOS. The tools are implemented in C++ and each supports a set of functionalities tailored to their respective platforms.
This file contains a Windows-specific MAC address changer implemented using WMI (Windows Management Instrumentation). It allows you to:
- Reset a network interface.
- (The functionality to set a MAC address is not implemented in this example.)
Usage:
WIN-MAC-Changer.exe -r <interface_name>
-r <interface_name>
: Reset the network interface specified by<interface_name>
Example:
WIN-MAC-Changer.exe -r "Ethernet"
This file contains a Linux-specific MAC address changer that utilizes system commands. It provides functionality to:
- Reset a network interface.
- Set a new MAC address for a network interface.
Usage:
LIN-MAC-Changer -r <interface_name>
LIN-MAC-Changer -s <interface_name> <mac_address>
-r <interface_name>
: Reset the network interface specified by<interface_name>
-s <interface_name> <mac_address>
: Set a new MAC address for<interface_name>
Example:
LIN-MAC-Changer -r eth0
LIN-MAC-Changer -s eth0 00:11:22:33:44:55
This file is for macOS and provides tools to:
- Reset a network interface.
- Set a new MAC address.
Usage:
MacOS-MAC-Changer -r <interface_name>
MacOS-MAC-Changer -s <mac_address>
-r <interface_name>
: Reset the network interface specified by<interface_name>
-s <mac_address>
: Set a new MAC address
Example:
MacOS-MAC-Changer -r en0
MacOS-MAC-Changer -s 00:11:22:33:44:55
To build these tools, you need to have a C++ compiler and the respective platform's development tools installed.
-
Open the Developer Command Prompt for Visual Studio.
-
Navigate to the directory containing
WIN-MAC-Changer.cpp
. -
Compile using:
cl WIN-MAC-Changer.cpp /link /out:WIN-MAC-Changer.exe
-
Open a terminal.
-
Navigate to the directory containing
LIN-MAC-Changer.cpp
. -
Compile using:
g++ LIN-MAC-Changer.cpp -o LIN-MAC-Changer
-
Open a terminal.
-
Navigate to the directory containing
MacOS-MAC-Changer.cpp
. -
Compile using:
g++ MacOS-MAC-Changer.cpp -o MacOS-MAC-Changer
- Permissions: Changing MAC addresses generally requires administrative privileges. Ensure you run the tools with sufficient permissions.
- Error Handling: Error handling is basic in these examples. For production use, consider enhancing error checking and handling.
Feel free to fork the repository and submit pull requests with improvements or additional features. If you encounter any issues, please open an issue in the repository.
This project is licensed under the MIT License - see the LICENSE file for details.