Skip to content

M4RC0Sx/Dominfo

Repository files navigation

Dominfo

Dominfo is a modern, lightweight Python library and CLI tool for performing WHOIS domain lookups. It provides a simple interface to query IANA servers and retrieve domain registration details, with support for pretty-printed terminal output or raw JSON data.


⚡ Features

  • Dual Mode: Use it as a command-line tool or import it as a Python library.
  • Rich Output: Beautifully formatted terminal output using the Rich library.
  • JSON Support: Easily export WHOIS data to JSON for programmatic processing.
  • Customizable: Support for custom IANA servers.

📦 Installation

You can install Dominfo via pip:

pip install dominfo

🚀 Usage

1. As a CLI Tool

You can run dominfo directly from your terminal to get information about a domain.

Basic Lookup: Get a pretty-printed overview of the domain.

python -m dominfo google.com

JSON Output: Get the output in machine-readable JSON format (useful for piping into jq or other tools).

python -m dominfo google.com --json
# or
dominfo google.com -j

cli-img

Custom IANA Server: Specify a specific WHOIS server if needed.

python -m dominfo google.com --iana-server whois.nic.ai

2. As a Python Library

You can easily integrate Dominfo into your own Python scripts.

from dominfo.client import DominfoClient

# Initialize the client
client = DominfoClient()

# Fetch WHOIS information
whois_info = client.get_whois_info("google.com")

# Print the result (returns a dictionary/object)
print(whois_info)

Using a custom server in Python:

client = DominfoClient(server="whois.verisign-grs.com")
info = client.get_whois_info("google.com")

📝 Dependencies

  • Typer: For the Command Line Interface.
  • Rich: For beautiful terminal formatting.

About

A modern, lightweight Python library and CLI for WHOIS domain lookups.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors