I had a Dell Optiplex acting as my Kodi box to play videos. Yesterday (I did not know it when I posted) it died, mostly like likely done in when the power flickered. It was on a UPS but the non battery side.
def rdap_lookup(domain): try: # Query the IANA Bootstrap service to find the RDAP URL for the domain tld = domain.split('.')[-1] bootstrap_url = f"https://data.iana.org/rdap/dns.json" bootstrap_data = requests.get(bootstrap_url).json()
for service in rdap_urls: if tld in service[0]: rdap_base_url = service[1][0] break
if not rdap_base_url: raise Exception(f"No RDAP server found for TLD: {tld}")
# Query the RDAP server for the domain rdap_response = requests.get(f"{rdap_base_url}domain/{domain}") rdap_response.raise_for_status()
data = rdap_response.json() print(f"\nRDAP Information for {domain}:\n") print(f"Handle: {data.get('handle')}") print(f"Status: {', '.join(data.get('status', []))}") print(f"Nameservers: {[ns['ldhName'] for ns in data.get('nameservers', [])]}") print(f"Entities: {[entity.get('handle') for entity in data.get('entities', [])]}") print(f"Events:") for event in data.get('events', []): print(f" - {event['eventAction']}: {event['eventDate']}") except Exception as e: print(f"Error: {e}")
# Example usage if __name__ == "__main__": parser = argparse.ArgumentParser(description="Perform RDAP domain lookup.") parser.add_argument("domain", help="Domain name to look up (e.g. example.com)") args = parser.parse_args()
rdap_lookup(args.domain)
Works well.
Got some new toys today trying to get ahead of the tariffs, to round out my emergency kit I got