- This topic has 6 replies, 2 voices, and was last updated 3 years, 4 months ago by Diego Pérez.
- AuthorPosts
- July 12, 2021 at 1:50 pm #56611lama.samraParticipant
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 subprocesssubprocess.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)July 12, 2021 at 5:55 pm #56619Diego PérezModeratorHi!
Do you have a wireless adapter attached to kali?
Let me know.
DiegoJuly 12, 2021 at 6:00 pm #56621lama.samraParticipantNo 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)July 13, 2021 at 1:46 pm #56629lama.samraParticipantTHAT WHAT I GET NOW WHEN I TYPE IFCONFIG AND IWGONFIG
root@kali:~# 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
root@kali:~# 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
July 13, 2021 at 5:56 pm #56636Diego PérezModeratorHi!
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!
DiegoJuly 14, 2021 at 3:32 pm #56662lama.samraParticipanthello
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:77eth0down: error fetching interface information: Device not found
eth0up: error fetching interface information: Device not found
July 15, 2021 at 5:27 pm #56691Diego PérezModeratorHi!
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 - AuthorPosts
- You must be logged in to reply to this topic.