I'm working on a network analysis tool (academic research), and I would like to find out what DNS is used on the machine the software is running on. I'm not a network admin, and I'm wondering: what's the easiest way to find that out; across platforms (that is, on each Linux, Mac and Windows), and preferably using something that's accessible in Python?
Usually, systems seem to conveniently hide this stuff from the user -- I can set a fixed DNS, or I can use my router's settings via DHCP, or ... I'm sure there are other systems too (LDAP?). So just looking at resolv.conf may not always lead to the right answer -- or does it?
Many thanks!