Ettercap/ettercap — pull request #265 by koeppea (2013-07-01 13:20:18+00:00)
Title: Implement mDNS spoofing (rework mdns_spoof plugin)

The current mDNS spoofing implemetation in ettercap isn't functional at all.
I ported the code from dns_spoof plugin and changed it to the different needs of mDNS.

After a while of studying the RFC (still) draft, I only saw use cases for mDNS A, AAAA, PTR and SRV record types. Therefore I didn't port the MX and WINS record types from the dns_spoof plugin.

The submitted pull-request also introduces two new ip_addr_* functions in ec_inet.c; (1) because with multicast protocols, spoofing doesn't work just by swaping the sender and target address - under certian circumstances an IP address need to be gernerated out of the blue; (2) one needs to check weather or not an IP address is multicast.

Finally the etter.mdns file has been gotten updated and a typo in the 'ip_addr_is_broadcast()' has been corrected.

I tested the code with the avahi-resolve tool and scapy.