Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #56611
    Avatarlama.samra
    Participant

    Hello when ever i try to run my mac_changer code it gives me this error

    wlan0: ERROR while getting interface flags: No such device

    SIOCSIFHWADDR: No such device

    wlan0: ERROR while getting interface flags: No such device

    here is my code
    import subprocess

    subprocess.call(“ifconfig wlan0 down”, shell=True)
    subprocess.call(“ifconfig wlan0 hw ether 00:11:22:33:44:66”, shell=True)
    subprocess.call(“ifconfig wlan0 up”, shell=True)

    #56619
    diegodiego
    Moderator

    Hi!

    Do you have a wireless adapter attached to kali?

    Let me know.
    Diego

    #56621
    Avatarlama.samra
    Participant

    No I don’t
    Actually when I also type ifconfig there is no wlan showing ( it was showing but when I did the code it disappeared)

    #56629
    Avatarlama.samra
    Participant

    THAT WHAT I GET NOW WHEN I TYPE IFCONFIG AND IWGONFIG

    [email protected]:~# ifconfig

    eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500

    inet 10.0.2.15 netmask 255.255.255.0 broadcast 10.0.2.255

    inet6 fe80::a00:27ff:fe05:69c1 prefixlen 64 scopeid 0x20<link>

    ether 08:00:27:05:69:c1 txqueuelen 1000 (Ethernet)

    RX packets 22724 bytes 30440221 (29.0 MiB)

    RX errors 0 dropped 0 overruns 0 frame 0

    TX packets 9684 bytes 885014 (864.2 KiB)

    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

    lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536

    inet 127.0.0.1 netmask 255.0.0.0

    inet6 ::1 prefixlen 128 scopeid 0x10<host>

    loop txqueuelen 1000 (Local Loopback)

    RX packets 160 bytes 9432 (9.2 KiB)

    RX errors 0 dropped 0 overruns 0 frame 0

    TX packets 160 bytes 9432 (9.2 KiB)

    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

    wlan1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500

    ether 0a:c2:4c:6e:02:be txqueuelen 1000 (Ethernet)

    RX packets 0 bytes 0 (0.0 B)

    RX errors 0 dropped 0 overruns 0 frame 0

    TX packets 0 bytes 0 (0.0 B)

    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

    wlan0mon: flags=867<UP,BROADCAST,NOTRAILERS,RUNNING,PROMISC,ALLMULTI> mtu 1500

    unspec 02-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 1000 (UNSPEC)

    RX packets 0 bytes 0 (0.0 B)

    RX errors 0 dropped 0 overruns 0 frame 0

    TX packets 0 bytes 0 (0.0 B)

    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

    [email protected]:~# iwconfig

    eth0 no wireless extensions.

    lo no wireless extensions.

    hwsim0 no wireless extensions.

    wlan1 IEEE 802.11 ESSID:off/any

    Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm

    Retry short limit:7 RTS thr:off Fragment thr:off

    Encryption key:off

    Power Management:on

    wlan0mon IEEE 802.11 Mode:Monitor Frequency:2.467 GHz Tx-Power=20 dBm

    Retry short limit:7 RTS thr:off Fragment thr:off

    Power Management:on

    #56636
    diegodiego
    Moderator

    Hi!
    Well, if you don’t have a wireless adapter then there won’t be any wlan0 interface. In such case you can try the code with the eth0 interface but it will lose internet connection after changing the mac address, that’s normal because it’s a virtual interface but if the code works then you cna move on.

    Greetings!
    Diego

    #56662
    Avatarlama.samra
    Participant

    hello
    when I run the code with eth0 that what I get is it normal?
    [+] Changing MAC addres for eth0 to 00:11:22:33:44:77

    eth0down: error fetching interface information: Device not found

    eth0up: error fetching interface information: Device not found

    #56691
    diegodiego
    Moderator

    Hi!

    No, it looks you have some typos in your code, actually you are missing some blank spaces. Can you share your code please?

    Thanks!
    Diego

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.