Whois No More

Stuff moves on, I didn’t know the whois protocol was getting deprecated.

Ran a whois and got this

Replaced with something called rdap. Frustrating searching for rdap utility, kept auto correcting to rdp.

Anyway I asked chatgpt and it give my some python code to use

#!/usr/bin/python3
import argparse
import requests
import sys

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()

rdap_urls = bootstrap_data['services']
rdap_base_url = None

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

Another buy before tariff purchase was some higher end USB PCIe cards

As for weight loss, I need to start somewhere. Did go to gym today for 30 minutes of Cardio

Weight: 342.4

This entry was posted in Coding, New Toys, Technical, Training, Weigh In. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.