Skip to content

vukamecos/fulldns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fulldns

A tool for collecting complete DNS information about a domain with email security validation.

Features

DNS Records

  • A/AAAA - IP addresses (IPv4/IPv6)
  • MX - Mail exchange servers
  • NS - Domain name servers
  • TXT - Text records
  • CNAME - Canonical name records
  • SOA - Start of authority records
  • PTR - Reverse DNS lookups (get hostname from IP)
  • SRV - Service locator records
  • CAA - Certificate Authority Authorization
  • DNSSEC - DNS Security Extensions validation and details

Email Security Validation

  • SPF - Sender Policy Framework validation
  • DMARC - Domain-based Message Authentication validation
  • DKIM - DomainKeys Identified Mail selector discovery and validation

Installation

# Build
make build

# Or install to $GOPATH/bin
make install

Usage

Quick Start

# Quick lookup (default command)
fulldns example.com

# Same as above, explicit command
fulldns lookup example.com

Available Commands

fulldns [command]

Available Commands:
  completion  Generate shell completion script
  help        Help about any command
  lookup      Perform a complete DNS lookup for a domain
  validate    Validate email security records (SPF, DMARC, DKIM)
  version     Print version information

Lookup Command

# Basic lookup (Markdown output)
fulldns lookup example.com

# JSON output
fulldns lookup example.com -o json

# Compact JSON without indentation
fulldns lookup example.com -o json -i=false

# Use a different DNS server
fulldns lookup example.com -s 1.1.1.1:53

# Disable email record validation
fulldns lookup example.com --no-email

# Quiet mode (suppress logs)
fulldns lookup example.com -q

# Verbose mode (debug logs)
fulldns lookup example.com -V

Validate Command

# Validate all email security records
fulldns validate example.com

# Validate only SPF
fulldns validate example.com --type spf

# Validate only DMARC
fulldns validate example.com --type dmarc

# Validate only DKIM
fulldns validate example.com --type dkim

# JSON output
fulldns validate example.com -o json

Shell Completion

# Bash
source <(fulldns completion bash)

# Zsh
source <(fulldns completion zsh)

# Fish
fulldns completion fish | source

Example Output

Markdown

# DNS Report: google.com

**Query Time:** 290.560542ms

## A Records (IPv4)

| Name | IP Address | TTL |
|------|------------|-----|
| google.com | 142.251.20.139 | 0 |
...

## Email Security Validation

### SPF**Valid**

**Record:** `v=spf1 include:_spf.google.com ~all`

JSON

{
  "domain": "google.com",
  "a": [
    {
      "type": "A",
      "name": "google.com",
      "value": "142.251.20.102",
      "ttl": 0
    }
  ],
  "email_validation": {
    "spf": {
      "record": "v=spf1 include:_spf.google.com ~all",
      "valid": true,
      ...
    }
  }
}

Global Flags

Flag Short Description Default
--output -o Output format: json, markdown markdown
--server -s DNS server for queries 8.8.8.8:53
--timeout -t DNS query timeout 10s
--indent -i Format JSON with indentation true
--quiet -q Suppress log output false
--verbose -V Enable verbose (debug) output false

Modern Go Features Used

  • Go 1.21+: slog for structured logging
  • Go 1.21+: slices package for slice operations
  • Go 1.21+: maps package for map operations
  • Go 1.21+: cmp.Or for default values
  • Go 1.20+: errors.Join for error aggregation
  • Go 1.20+: context.WithTimeoutCause for cancellation causes
  • Go 1.18+: Generics for type-safe functions

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors