Having python module i want to record queries and answers to MySQL database. From example1,2 i know how to get queries like “example.com” but don’t yet know which python variable can get me answer of IP address list from respond. Is it possible with python module to do this?
You can do this in ldns, but may find it easier to do in ldnsx (http://oldwww.xelerance.com/ldnsx/html/). Using the convenience function get_rrs() we can do: