saghul / pycares

Python interface for c-ares
https://pypi.org/project/pycares/
MIT License
163 stars 74 forks source link

TTL values reported as -1 #109

Closed mutax closed 4 years ago

mutax commented 4 years ago

For some reason a lot of TTL-Values are being reported as -1 although I see in wireshark that the nameservers return the correct value.

e.g.:

$ python3 -m pycares NS google.de
;; ANSWER SECTION:
google.de       -1  IN  NS  ns3.google.com
google.de       -1  IN  NS  ns4.google.com
google.de       -1  IN  NS  ns2.google.com
google.de       -1  IN  NS  ns1.google.com
saghul commented 4 years ago

Unfortunately c-ares (even with the TTL patch) doesn't include this data, so it's not currently parsed: https://github.com/saghul/pycares/blob/8fc84b2523b68d7d18c3e8099a20a14a7fbdae03/src/pycares/__init__.py#L628