Ettercap/ettercap — pull request #141 by jacob-baines (2013-03-23 18:42:27+00:00)
Title: Added ascii FQDN support to DHCP ACK

DHCP option 81 provides us with the client's fully qualified domain name (FQDN) which we can use to populate the client's hostname in the profile. The RFC can be found here: https://tools.ietf.org/html/rfc4702.

The domain name can be presented into two formats: ascii and canonical wire format. A single bit in option 81 indicates which format is being used. Technically speaking, the ascii format is deprecated, but I don't have a setup / couldn't find a capture that didn't use it. I assume I could pass the wire format data into resolv_cache_insert, but without test data I didn't want to go too crazy.

To test this, you can use a capture on wireshark's sample captures: http://wiki.wireshark.org/SampleCaptures?action=AttachFile&do=get&target=dhcp-and-dyndns.pcap.gz

And here is a before / after profile screenshot:
Before
![before](https://f.cloud.github.com/assets/787916/294399/755c07f8-93e8-11e2-8f6b-bbbde78a7752.png)

After
![after](https://f.cloud.github.com/assets/787916/294401/89936aa4-93e8-11e2-9f36-22994ccea63f.png)