<s> import dns . query <EOL> import dns . resolver <EOL> import dns . zone <EOL> soa_answer = dns . resolver . query ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> master_answer = dns . resolver . query ( soa_answer [ <NUM_LIT:0> ] . mname , '<STR_LIT:A>' ) <EOL> z = dns . zone . from_xfr ( dns . query . xfr ( master_answer [ <NUM_LIT:0> ] . address , '<STR_LIT>' ) ) <EOL> names = z . nodes . keys ( ) <EOL> names . sort ( ) <EOL> for n in names : <EOL> print z [ n ] . to_text ( n ) </s>
