I have been re-working my dns-service-discovery and lexmark-config scripts to make use of the nmap dns library. Why I failed to do this from the beginning is a mystery to me and others. The re-work went well and the end result allowed me to completely ditch the mdns library. In order to achieve what I needed I had to make some slight changes to the dns library which I have posted as a patch to the nmap-dev list.
While re-working the dns-service-discovery script I totally changed the output as well. It’s now less DNS:ish and more focused around the information. Here’s an example of the new format:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
PORT STATE SERVICE REASON 5353/udp open zeroconf udp-response | dns-service-discovery: | 548/tcp afpovertcp | model=MacBook5,1 | Address=192.168.0.2 fe80:0:0:0:223:6cff:1234:5678 | 3689/tcp daap | txtvers=1 | iTSh Version=196609 | MID=0xFB5338C04123456 | Database ID=6FA9761FE123456 | dmv=131078 | Version=196616 | OSsi=0x1F6 | Machine Name=Patrik KarlssonxE2x80x99s Library | Media Kinds Shared=1 | Machine ID=8945A7123456 | Password=0 |_ Address=192.168.0.2 fe80:0:0:0:223:6cff:1234:5678 |
As the dns library is in use by other scripts I’ll wait until the changes are tested and confirmed not to break stuff before I post it here. If someone is eager to try the new scripts out the patch and scripts can be found here:
http://seclists.org/nmap-dev/2010/q1/92
http://seclists.org/nmap-dev/2010/q1/87