Hello All,
when running the below python script from the terminal to change an interface MAC, I get the following message: "siocsifhwaddr cannot assign requested address"
any ideas of what could be happening?
---------------------------------------------------------------------------------------------------------------------------------
#!/usr/bin/env python
import subprocess
interface = "eth0"
new_mac = "11:22:33:44:55:11"
print("[+] Changing MAC for " + interface + " to " + new_mac)
subprocess.call("ifconfig " + interface + " down", shell=True)
subprocess.call("ifconfig " + interface + " hw ether " + new_mac, shell=True)
subprocess.call("ifconfig " + interface + " up", shell=True)
-----------------------------------------------------------------------------------------------------------------------------------------
ASKER
Thank you!