Skip to content

【域名扫描器】一个用Go语言编写的强大且灵活的域名注册可用性检查扫描工具 A powerful and flexible domain name availability checker written in Go. This tool helps you find available domain names based on various patterns and filters.

License

Notifications You must be signed in to change notification settings

xuemian168/domain-scanner

Repository files navigation

English | 中文

Domain Scanner

Go Version License GitHub Stars GitHub Forks GitHub Issues GitHub Pull Requests

A powerful domain name availability checker written in Go. This tool helps you find available domain names by checking multiple registration indicators and providing detailed verification results.

Web Version: zli.li

Star History Chart

Features

  • Multi-method Verification: Checks domain availability using multiple methods:
    • DNS records (NS, A, MX)
    • WHOIS information
    • SSL certificate verification
  • Advanced Filtering: Filter domains using regular expressions
  • Concurrent Processing: Multi-threaded domain checking with configurable worker count
  • Smart Error Handling: Automatic retry mechanism for failed queries
  • Detailed Results: Shows verification signatures for registered domains
  • Progress Tracking: Real-time progress display with current/total count
  • File Output: Saves results to separate files for available and registered domains
  • Configurable Delay: Adjustable delay between queries to prevent rate limiting

Installation

git clone https://github.com/xuemian168/domain-scanner.git
cd domain-scanner
go mod download

Usage

go run main.go [options]

Options

  • -l int: Domain length (default: 3)
  • -s string: Domain suffix (default: .li)
  • -p string: Domain pattern:
    • d: Pure numbers (e.g., 123.li)
    • D: Pure letters (e.g., abc.li)
    • a: Alphanumeric (e.g., a1b.li)
  • -r string: Regex filter for domain names
  • -regex-mode string: Regex matching mode (default: full)
    • full: Match entire domain name
    • prefix: Match only domain name prefix
  • -delay int: Delay between queries in milliseconds (default: 1000)
  • -workers int: Number of concurrent workers (default: 10)
  • -show-registered: Show registered domains in output (default: false)
  • -h: Show help information

Examples

  1. Check 3-letter .li domains with 20 workers:
go run main.go -l 3 -s .li -p D -workers 20
  1. Check domains with custom delay and workers:
go run main.go -l 3 -s .li -p D -delay 500 -workers 15
  1. Show both available and registered domains:
go run main.go -l 3 -s .li -p D -show-registered
  1. Use regex filter with full domain matching:
go run main.go -l 3 -s .li -p D -r "^[a-z]{2}[0-9]$" -regex-mode full
  1. Use regex filter with prefix matching:
go run main.go -l 3 -s .li -p D -r "^[a-z]{2}" -regex-mode prefix

Output Format

Progress Display

[1/100] Domain abc.com is AVAILABLE!
[2/100] Domain xyz.com is REGISTERED [DNS_NS, WHOIS]
[3/100] Domain 123.com is REGISTERED [DNS_A, SSL]

Verification Signatures

  • DNS_NS: Domain has name server records
  • DNS_A: Domain has IP address records
  • DNS_MX: Domain has mail server records
  • WHOIS: Domain is registered according to WHOIS
  • SSL: Domain has a valid SSL certificate

Output Files

  • Available domains: available_domains_[pattern]_[length]_[suffix].txt
  • Registered domains: registered_domains_[pattern]_[length]_[suffix].txt

Error Handling

The tool includes robust error handling:

  • Automatic retry mechanism for WHOIS queries (3 attempts)
  • Timeout settings for SSL certificate checks
  • Graceful handling of network issues
  • Detailed error reporting

Contributing

PRs Welcome

Contributions are welcome! Please feel free to submit a Pull Request.

License

AGPL-3.0 License

This project is licensed under the AGPL-3.0 License - see the LICENSE file for details.

Version History

v1.3.0

  • Performance Optimizations: Significantly improved domain checking speed
    • Optimized reserved domain detection with O(1) map lookups
    • Pre-compiled regex patterns for better performance
    • Enhanced WHOIS response parsing efficiency
  • Bug Fixes: Fixed WHOIS parsing for .de domains and other TLDs
  • Code Quality: Refactored internal architecture for better maintainability

v1.2.2

  • Added flexible regex matching mode with -regex-mode option
  • Improved domain filtering capabilities
  • Enhanced error handling for regex patterns

About

【域名扫描器】一个用Go语言编写的强大且灵活的域名注册可用性检查扫描工具 A powerful and flexible domain name availability checker written in Go. This tool helps you find available domain names based on various patterns and filters.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages