Skip to content
Advertisement

How can I add a parameter request list in DHCP header with Scapy?

I try to make a DHCP pachet with parameter request list option and to add three parameters in that request.

This is what i done but the pachet I see on Wireshark look`s to be malformed:

JavaScript

I also try to pass the parametes as a list of codes of the parameters i want to be included in the request list, but still the packet is malformed.

Advertisement

Answer

(this answer deals with a discover packet, not a request packet, because that’s what I’m writing)

You can create the DHCP frame like this:

JavaScript

Once you’ve crafted the ether, ip, udp and bootp frames:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement