Thanks for the input
I query the dns server band I get the response

howl.dnspython.org. 3600 IN A 78.32.75.15
The TTL is 3600

When I query again I get the response

howl.dnspython.org. 3565 IN A 78.32.75.15
The TTL is 3600



Now I know the local cache is coming into picture .
Can you tell how can I remove this behavior.
So I get only the real TTL (3600 in this case)
Regards
Pankaj Rawat

From: Bob Halley [mailto:[email protected]]
Sent: Sunday, April 15, 2012 6:39 AM
To: Pankaj Rawat
Cc: [email protected]
Subject: Re: [dnspython-dev] extract ttl through dnspython


On Apr 13, 2012, at 4:37 AM, Pankaj Rawat wrote:


Hi all ,
I am currently using dnspython to query DNS.
I am not able to figure out how to extract ttl from DNS  using DNSPython
Is there is any way to achieve it?

Use the TTL field of the rrset or rdataset object, e.g.:

import dns.resolver

answer = dns.resolver.query('www.dnspython.org')
print answer.rrset
print 'The TTL is', answer.rrset.ttl





DISCLAIMER:

-----------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and
intended

for the named recipient(s) only. 

It shall not attach any liability on the originator or NECHCL or its

affiliates. Any views or opinions presented in 

this email are solely those of the author and may not necessarily reflect the

opinions of NECHCL or its affiliates. 

Any form of reproduction, dissemination, copying, disclosure, modification,

distribution and / or publication of 

this message without the prior written consent of the author of this e-mail is

strictly prohibited. If you have 

received this email in error please delete it and notify the sender

immediately. .

-----------------------------------------------------------------------------------------------------------------------
_______________________________________________
dnspython-dev mailing list
[email protected]
http://howl.play-bow.org/mailman/listinfo/dnspython-dev

Reply via email to