Python Forum
eth0: [ERROR] Set device name: No such device
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
eth0: [ERROR] Set device name: No such device
#1
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 permitted
I also always get the
Error:
SIOCSIFFLAGS: Operation not permitted
error, I would like to fix that too.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  cheap and low power python device kucingkembar 6 1,590 Jun-27-2024, 12:41 PM
Last Post: kucingkembar
  Input network device connection info from data file edroche3rd 6 2,765 Oct-12-2023, 02:18 AM
Last Post: edroche3rd
  How to automate loop test check on Network device jpc230 1 1,438 Oct-09-2023, 09:54 PM
Last Post: Larz60+
  Name of USB device on Anodrid frohr 0 1,598 Aug-14-2023, 06:36 AM
Last Post: frohr
  Help with bleak - how to send test to BLE device? korenron 1 3,291 Aug-28-2022, 11:28 PM
Last Post: Larz60+
  Scan for Bluetooth device korenron 0 3,539 Jan-10-2022, 01:06 PM
Last Post: korenron
  Sending string commands from Python to a bluetooth device Rovelin 13 16,162 Aug-31-2021, 06:40 PM
Last Post: deanhystad
  Python BLE Scanner not detecting device alexanderDennisEnviro500 0 2,601 Aug-01-2021, 02:29 AM
Last Post: alexanderDennisEnviro500
  Real Time Audio Processing with Python Sound-Device not working Slartybartfast 2 6,487 Mar-14-2021, 07:20 PM
Last Post: Slartybartfast
  Connect device using Visa TCP Socket connection d777py 1 4,917 Jan-08-2021, 05:08 PM
Last Post: d777py

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020