The goal of this project is to change the MAC address of a network interface using Python. Students will learn how to interact with the Linux terminal using subprocess, parse command-line arguments with optparse, and use regular expressions to extract MAC addresses from network configurations.
Students will:
1️⃣ Use Python and subprocess to execute system commands like ifconfig.
2️⃣ Extract the current MAC address from the system output using regular expressions (re).
3️⃣ Allow user input via command-line arguments (optparse) to select an interface and specify a new MAC address.
4️⃣ Disable the interface, change the MAC, and re-enable it using system commands.
5️⃣ Verify if the MAC address change was successful and display appropriate messages.
6️⃣ Test the script on a Linux-based system in a controlled environment.
By completing this project, students will:
✅ Understand how MAC addresses work and their role in networking.
✅ Learn how to modify MAC addresses using Python scripts.
✅ Gain experience with subprocess for executing system commands.
✅ Use regular expressions (re) to extract MAC addresses.
✅ Work with command-line arguments using optparse.
✅ Understand why MAC address spoofing is used in security research, penetration testing, and privacy protection.