CyberLearn
← Back to beginner
Beginner

DNS Lookup CLI Tool

Query DNS records with WHOIS

Log in to track progress
2–3hPython

What you'll learn

  • DNS protocols
  • WHOIS queries
  • Reverse DNS lookup
██████╗ ███╗   ██╗███████╗██╗      ██████╗  ██████╗ ██╗  ██╗██╗   ██╗██████╗
██╔══██╗████╗  ██║██╔════╝██║     ██╔═══██╗██╔═══██╗██║ ██╔╝██║   ██║██╔══██╗
██║  ██║██╔██╗ ██║███████╗██║     ██║   ██║██║   ██║█████╔╝ ██║   ██║██████╔╝
██║  ██║██║╚██╗██║╚════██║██║     ██║   ██║██║   ██║██╔═██╗ ██║   ██║██╔═══╝
██████╔╝██║ ╚████║███████║███████╗╚██████╔╝╚██████╔╝██║  ██╗╚██████╔╝██║
╚═════╝ ╚═╝  ╚═══╝╚══════╝╚══════╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝ ╚═════╝ ╚═╝

Cybersecurity Projects Python License: AGPLv3 PyPI

Professional DNS query CLI with Rich terminal output, reverse lookups, and WHOIS integration.

This is a quick overview — security theory, architecture, and full walkthroughs are in the learn modules.

Screenshots & demo →

What It Does

  • Query A, AAAA, MX, NS, TXT, CNAME, and SOA records with colored table output
  • Reverse DNS lookup to resolve IP addresses back to hostnames
  • Trace DNS resolution path from root servers to authoritative nameservers
  • Batch lookups with concurrent queries for processing domain lists
  • WHOIS integration for domain registration information
  • JSON export for scripting and pipeline integration

Quick Start

uv tool install dnslookup-cli
dnslookup query example.com

[!TIP] This project uses just as a command runner. Type just to see all available commands.

Install: curl -sSf https://just.systems/install.sh | bash -s -- --to ~/.local/bin

Commands

CommandDescription
dnslookup queryQuery DNS records for a domain with colored table output
dnslookup reverseResolve an IP address back to its hostname
dnslookup traceTrace the DNS resolution path from root to authoritative servers
dnslookup batchQuery multiple domains concurrently from a file
dnslookup whoisRetrieve WHOIS registration information for a domain

Learn

This project includes step-by-step learning materials covering security theory, architecture, and implementation.

ModuleTopic
00 - OverviewPrerequisites and quick start
01 - ConceptsSecurity theory and real-world breaches
02 - ArchitectureSystem design and data flow
03 - ImplementationCode walkthrough
04 - ChallengesExtension ideas and exercises

License

AGPL 3.0