eth0: [ERROR] Set device name: No such device
by inkmin from LinuxQuestions.org on (#6R6DN)
I cannot change the MAC address in my Kali VM with this Python code:
Quote:
but I could change it with these commands:
Quote:
Here are the input commands and the error:
Quote:
I also always get the Quote:
error, I would like to fix that too.
Quote:
interface = input("interface > ") new_mac = input("new MAC > ") subprocess.call(["ifconfig", interface, "down"]) subprocess.call(["sudo", "-S", "macchanger", "--mac=", new_mac, "", interface]) subprocess.call(["ifconfig", interface, "up"]) |
Quote:
interface = input("interface > ") new_mac = input("new MAC > ") subprocess.call("ifconfig " + interface + " down" , shell=True) subprocess.call("sudo -S macchanger --mac=" + new_mac + " " + interface, shell=True) subprocess.call("ifconfig " + interface + " up", shell=True) |
Quote:
interface > eth0 new MAC > 00:11:11:11:11:11 [+] Changing MAC address for eth0 to 00:11:11:11:11:11 SIOCSIFFLAGS: Operation not permitted [ERROR] Set device name: No such device SIOCSIFFLAGS: Operation not permitted |
SIOCSIFFLAGS: Operation not permitted |