I'm learning python programming and wanted to try out some scripts in changing MAC Addresses in linux but i keep getting the following error:
/bin/sh : 1 : ifconfigeth0down : not found
/bin/sh : 1 : ifconfigeth0hw : not found
/bin/sh : 1 : ifconfigeth0up : not found
Would appreciate if anyone can help me out on this, thank you.
The code is as follows:
#!/usr/bin/env python
import_subprocess
interface = input("interface >")
new_mac = input("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)*