Other versions of this code:
# Mac changer code
Import subprocess
iface = input("Name of Interface for changing MAC Address: ")
nmac = input("Type the new MAC Address to be used: ")
def mchange():
print("Changing the MAC Address as per the input")
subprocess.call(["ifconfig", iface, "down"])
subprocess.call(["ifconfig", iface, "hw", "ether", nmac])
subprocess.call(["ifconfig", iface, "up"])
print("MAC Address changed Successfully to: " + nmac)
mchange()

Leave a comment