0

I created a request using scapy. It works fine with my eth0 interface. I send a message to the discoverer and i get an offer. But it doesn't work through the wlan0 interface, when I connect to it via wifi and try to send a packet. Why is this happening ? How to fix it ?

from scapy.all import *

conf.checkIPaddr = False


dhcp_discover = Ether(dst='ff:ff:ff:ff:ff:ff',src=RandMAC())  \
                 /IP(src='0.0.0.0',dst='255.255.255.255') \
                 /UDP(sport=68,dport=67) \
                 /BOOTP(op=1, chaddr=RandMAC()) \
                 /DHCP(options=[('message-type','discover'),('end')])

#sendp(dhcp_discover,iface='eth0') # Ok 
sendp(dhcp_discover,iface='wlan0') # not working

enter image description here

sudo root
  • 1
  • 1
  • Please make sure your image is visible on first sight – pommy May 10 '22 at 09:56
  • Does this answer your question? [Sending DHCP Discover using python scapy](https://stackoverflow.com/questions/25124500/sending-dhcp-discover-using-python-scapy) – gerrit_noob Jan 31 '23 at 04:34

0 Answers0