Hello group,
What I try to achieve is query authoritative DNS server using dnspython and check for authoritative answer (AA) flag in the response. So far I have:
1. create a query message:
>>> qm = dns.message.make_query('
amazon.com', dns.rdatatype.SOA)
2. query specific server:
>>> qa = dns.query.udp(qm, '204.74.108.1', timeout=4)
3. apply to_text() function to qa:
>>> qa.to_text()
4. parse it for the AA flag
Is there a better alternative instead of 3) and 4)? Something providing explicitly the flags with no need to parse that long string.
Is there alternative way to achieve the same?
Thank you.
ena