Oct-03-2024, 12:52 AM
I cannot change the MAC address in my Kali VM with this Python code:
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"])but I could change it with this code: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)Here are the input commands and the error:Error: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 permittedI also always get the Error:SIOCSIFFLAGS: Operation not permitted error, I would like to fix that too. 