|
|
|
@ -17,7 +17,7 @@ import fcntl
|
|
|
|
|
IANABASE = "https://data.iana.org/rdap/dns.json" |
|
|
|
|
CACHE = os.environ["HOME"] + "/.ianardapcache.json" |
|
|
|
|
MAXAGE = 24 # Hours |
|
|
|
|
IANATIMEOUT = 10 |
|
|
|
|
IANATIMEOUT = 10 # Seconds |
|
|
|
|
|
|
|
|
|
class IanaRDAPDatabase(): |
|
|
|
|
|
|
|
|
@ -67,6 +67,8 @@ class IanaRDAPDatabase():
|
|
|
|
|
|
|
|
|
|
def find(self, domain): |
|
|
|
|
""" Get the RDAP server for a given domain name. None if there is none.""" |
|
|
|
|
if domain.endswith("."): |
|
|
|
|
domain = domain[:-1] |
|
|
|
|
labels = domain.split(".") |
|
|
|
|
tld = labels[len(labels)-1] |
|
|
|
|
if tld in self.services: |
|
|
|
|