Check if whois end the nsname wiuth a dot

This commit is contained in:
Dryusdan 2022-06-24 15:56:09 +02:00
parent c1693ea746
commit 7a3e7b78a5
1 changed files with 4 additions and 1 deletions

View File

@ -38,7 +38,10 @@ def get_whois_nsname(zone):
records = whois.whois(zone)
ns_server = []
for record in records["name_servers"]:
ns_server.append(f"{record}.")
if not record.endswith('.'):
ns_server.append(f"{record}.")
else:
ns_server.append(f"{record}")
return ns_server
if __name__ == '__main__':