# DNS Checker CLI
A powerful command-line tool for DNS lookups, SSL certificate inspection, and HTTP pinging.
## Features
- 🔍 **DNS Record Lookup**: Query A, AAAA, CNAME, MX, TXT records
- 🔒 **SSL Certificate Inspection**: Detailed certificate information and expiration warnings
- 📡 **HTTP Ping**: Real-time HTTP/HTTPS request monitoring with server IP change detection
- 🎨 **Rich Output**: Visually rich terminal output
- ⚙️ **Custom Nameserver**: Specify custom DNS servers for queries
## Installation
### Requirements
- Python 3.7 or higher
### Installation Steps
```bash
# Clone the repository
git clone <repository-url>
cd dns-checker-cli
# Create virtual environment (recommended)
python -m venv venv
source venv/bin/activate # macOS/Linux
# or
venv\Scripts\activate # Windows
# Install dependencies
pip install -r requirements.txt
# Install in development mode
pip install -e .
```
## Usage
### DNS Record Lookup
Query DNS records for a domain.
```bash
# Basic usage
dns-checker dns example.com
# Use custom nameserver
dns-checker dns example.com --nameserver 8.8.8.8
dns-checker dns example.com -n 1.1.1.1
```
### SSL Certificate Inspection
Query both DNS information and SSL certificate for a domain.
```bash
# Basic usage
dns-checker inspect example.com
# Use custom nameserver
dns-checker inspect example.com --nameserver 8.8.8.8
```
**Output Information:**
- DNS records (A, AAAA, CNAME, MX, TXT)
- SSL certificate issuer and subject
- Certificate validity period
- SAN (Subject Alternative Names)
- Signature algorithm
- Expiration warning (within 30 days)
### HTTP Ping
Periodically send HTTP/HTTPS requests to monitor server status.
```bash
# Basic usage (1 second interval, infinite loop)
dns-checker httping https://example.com
# Specify interval (2 seconds)
dns-checker httping https://example.com --interval 2
dns-checker httping https://example.com -i 2
# Specify count (10 times)
dns-checker httping https://example.com --count 10
dns-checker httping https://example.com -c 10
# Use custom nameserver
dns-checker httping https://example.com --nameserver 8.8.8.8
# Force connection to specific IP (keep domain but change IP)
dns-checker httping https://naver.com --server 223.130.200.219
dns-checker httping https://example.com -s 93.184.216.34
# Combined usage
dns-checker httping https://example.com -i 2 -c 20 -n 8.8.8.8 -s 93.184.216.34
```
**Output Information:**
- Response time (milliseconds)
- HTTP status code
- Server IP address
- Content-Length (response size)
- Content-Type (response type)
- IP change detection (migration monitoring)
- Forced IP connection indicator
- Statistics (average/min/max response time, success rate)
**Stop:** Press `Ctrl+C` to stop and display statistics.
## Usage Examples
### Domain Migration Monitoring
```bash
# Monitor domain during migration to new server
dns-checker httping https://mysite.com -i 5
# Server IP changes will be highlighted
```
### Test with Specific IP
```bash
# Request to specific IP while keeping domain as naver.com
# Host header remains naver.com, works with virtual host environments
dns-checker httping https://naver.com --server 223.130.200.219 -c 5
# Test new server before migration
dns-checker httping https://mysite.com --server 192.168.1.100 -c 10
```
### DNS Propagation Check
```bash
# Check DNS records with multiple nameservers
dns-checker dns example.com -n 8.8.8.8
dns-checker dns example.com -n 1.1.1.1
dns-checker dns example.com -n 208.67.222.222
```
### SSL Certificate Expiration Check
```bash
# Check certificate expiration date
dns-checker inspect example.com
# Warning displayed if expiring within 30 days
```
## Options
### Common Options
- `--help`: Show help message
- `--version`: Show version information
### DNS Command Options
- `--nameserver, -n`: Custom nameserver IP address
### Inspect Command Options
- `--nameserver, -n`: Custom nameserver IP address
### HTTPing Command Options
- `--interval, -i`: Request interval in seconds (default: 1)
- `--count, -c`: Number of requests (infinite if not specified)
- `--nameserver, -n`: Custom nameserver IP address
- `--server, -s`: Force connection to specific server IP (keep domain but use specific IP)
## Development
### Development Environment Setup
```bash
# Install development dependencies
make dev
# Or manually
pip install -r requirements.txt
pip install pytest pytest-cov pytest-mock flake8 black
pip install -e .
```
### Running Tests
```bash
# Using Makefile (recommended)
make test # Run all tests
make test-cov # Run tests with coverage
# Or run directly
pytest
pytest tests/test_dns_service.py
pytest --cov=dns_checker
```
### Code Quality
```bash
make lint # Run code linting
make format # Format code
make verify # Full verification (lint + tests)
```
### Build and Deploy
```bash
make build # Build package
make upload-test # Upload to TestPyPI
make upload # Upload to PyPI
make release # Full release (test → build → upload)
```
For more details, see [PYPI_UPLOAD_GUIDE.md](PYPI_UPLOAD_GUIDE.md).
### Code Style
This project follows the PEP 8 style guide.
## Dependencies
- `click>=8.0.0`: CLI framework
- `dnspython>=2.0.0`: DNS queries
- `cryptography>=3.4.0`: SSL certificate parsing
- `requests>=2.25.0`: HTTP requests
- `rich>=10.0.0`: Terminal output formatting
## License
MIT License
## Contributing
Issues and pull requests are welcome!
Raw data
{
"_id": null,
"home_page": "https://github.com/jinwoo-j/dns-checker",
"name": "dns-checker-cli",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "dns ssl certificate http ping monitoring cli",
"author": "JINWOO",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/68/22/96b1a926b5ec3d291438afbc96d768c75745197b1c01408d523bd4952ba0/dns_checker_cli-0.1.1.tar.gz",
"platform": null,
"description": "# DNS Checker CLI\n\nA powerful command-line tool for DNS lookups, SSL certificate inspection, and HTTP pinging.\n\n## Features\n\n- \ud83d\udd0d **DNS Record Lookup**: Query A, AAAA, CNAME, MX, TXT records\n- \ud83d\udd12 **SSL Certificate Inspection**: Detailed certificate information and expiration warnings\n- \ud83d\udce1 **HTTP Ping**: Real-time HTTP/HTTPS request monitoring with server IP change detection\n- \ud83c\udfa8 **Rich Output**: Visually rich terminal output\n- \u2699\ufe0f **Custom Nameserver**: Specify custom DNS servers for queries\n\n## Installation\n\n### Requirements\n\n- Python 3.7 or higher\n\n### Installation Steps\n\n```bash\n# Clone the repository\ngit clone <repository-url>\ncd dns-checker-cli\n\n# Create virtual environment (recommended)\npython -m venv venv\nsource venv/bin/activate # macOS/Linux\n# or\nvenv\\Scripts\\activate # Windows\n\n# Install dependencies\npip install -r requirements.txt\n\n# Install in development mode\npip install -e .\n```\n\n## Usage\n\n### DNS Record Lookup\n\nQuery DNS records for a domain.\n\n```bash\n# Basic usage\ndns-checker dns example.com\n\n# Use custom nameserver\ndns-checker dns example.com --nameserver 8.8.8.8\ndns-checker dns example.com -n 1.1.1.1\n```\n\n### SSL Certificate Inspection\n\nQuery both DNS information and SSL certificate for a domain.\n\n```bash\n# Basic usage\ndns-checker inspect example.com\n\n# Use custom nameserver\ndns-checker inspect example.com --nameserver 8.8.8.8\n```\n\n**Output Information:**\n- DNS records (A, AAAA, CNAME, MX, TXT)\n- SSL certificate issuer and subject\n- Certificate validity period\n- SAN (Subject Alternative Names)\n- Signature algorithm\n- Expiration warning (within 30 days)\n\n### HTTP Ping\n\nPeriodically send HTTP/HTTPS requests to monitor server status.\n\n```bash\n# Basic usage (1 second interval, infinite loop)\ndns-checker httping https://example.com\n\n# Specify interval (2 seconds)\ndns-checker httping https://example.com --interval 2\ndns-checker httping https://example.com -i 2\n\n# Specify count (10 times)\ndns-checker httping https://example.com --count 10\ndns-checker httping https://example.com -c 10\n\n# Use custom nameserver\ndns-checker httping https://example.com --nameserver 8.8.8.8\n\n# Force connection to specific IP (keep domain but change IP)\ndns-checker httping https://naver.com --server 223.130.200.219\ndns-checker httping https://example.com -s 93.184.216.34\n\n# Combined usage\ndns-checker httping https://example.com -i 2 -c 20 -n 8.8.8.8 -s 93.184.216.34\n```\n\n**Output Information:**\n- Response time (milliseconds)\n- HTTP status code\n- Server IP address\n- Content-Length (response size)\n- Content-Type (response type)\n- IP change detection (migration monitoring)\n- Forced IP connection indicator\n- Statistics (average/min/max response time, success rate)\n\n**Stop:** Press `Ctrl+C` to stop and display statistics.\n\n## Usage Examples\n\n### Domain Migration Monitoring\n\n```bash\n# Monitor domain during migration to new server\ndns-checker httping https://mysite.com -i 5\n\n# Server IP changes will be highlighted\n```\n\n### Test with Specific IP\n\n```bash\n# Request to specific IP while keeping domain as naver.com\n# Host header remains naver.com, works with virtual host environments\ndns-checker httping https://naver.com --server 223.130.200.219 -c 5\n\n# Test new server before migration\ndns-checker httping https://mysite.com --server 192.168.1.100 -c 10\n```\n\n### DNS Propagation Check\n\n```bash\n# Check DNS records with multiple nameservers\ndns-checker dns example.com -n 8.8.8.8\ndns-checker dns example.com -n 1.1.1.1\ndns-checker dns example.com -n 208.67.222.222\n```\n\n### SSL Certificate Expiration Check\n\n```bash\n# Check certificate expiration date\ndns-checker inspect example.com\n\n# Warning displayed if expiring within 30 days\n```\n\n## Options\n\n### Common Options\n\n- `--help`: Show help message\n- `--version`: Show version information\n\n### DNS Command Options\n\n- `--nameserver, -n`: Custom nameserver IP address\n\n### Inspect Command Options\n\n- `--nameserver, -n`: Custom nameserver IP address\n\n### HTTPing Command Options\n\n- `--interval, -i`: Request interval in seconds (default: 1)\n- `--count, -c`: Number of requests (infinite if not specified)\n- `--nameserver, -n`: Custom nameserver IP address\n- `--server, -s`: Force connection to specific server IP (keep domain but use specific IP)\n\n## Development\n\n### Development Environment Setup\n\n```bash\n# Install development dependencies\nmake dev\n\n# Or manually\npip install -r requirements.txt\npip install pytest pytest-cov pytest-mock flake8 black\npip install -e .\n```\n\n### Running Tests\n\n```bash\n# Using Makefile (recommended)\nmake test # Run all tests\nmake test-cov # Run tests with coverage\n\n# Or run directly\npytest\npytest tests/test_dns_service.py\npytest --cov=dns_checker\n```\n\n### Code Quality\n\n```bash\nmake lint # Run code linting\nmake format # Format code\nmake verify # Full verification (lint + tests)\n```\n\n### Build and Deploy\n\n```bash\nmake build # Build package\nmake upload-test # Upload to TestPyPI\nmake upload # Upload to PyPI\nmake release # Full release (test \u2192 build \u2192 upload)\n```\n\nFor more details, see [PYPI_UPLOAD_GUIDE.md](PYPI_UPLOAD_GUIDE.md).\n\n### Code Style\n\nThis project follows the PEP 8 style guide.\n\n## Dependencies\n\n- `click>=8.0.0`: CLI framework\n- `dnspython>=2.0.0`: DNS queries\n- `cryptography>=3.4.0`: SSL certificate parsing\n- `requests>=2.25.0`: HTTP requests\n- `rich>=10.0.0`: Terminal output formatting\n\n## License\n\nMIT License\n\n## Contributing\n\nIssues and pull requests are welcome!\n",
"bugtrack_url": null,
"license": null,
"summary": "A CLI tool for DNS lookups, SSL inspection, and HTTP pinging",
"version": "0.1.1",
"project_urls": {
"Homepage": "https://github.com/jinwoo-j/dns-checker"
},
"split_keywords": [
"dns",
"ssl",
"certificate",
"http",
"ping",
"monitoring",
"cli"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "3ff00828c87c93af54f329b9024427fa50f1033cfbbff9a8e143b88b4fe20a9b",
"md5": "db1d930cf45693093470ae3daaf7bf39",
"sha256": "b275c3b49ca36012cc257cca9a386175d1ae4fc9f547a128678472d37ddeae07"
},
"downloads": -1,
"filename": "dns_checker_cli-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "db1d930cf45693093470ae3daaf7bf39",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 20274,
"upload_time": "2025-10-10T02:53:03",
"upload_time_iso_8601": "2025-10-10T02:53:03.736633Z",
"url": "https://files.pythonhosted.org/packages/3f/f0/0828c87c93af54f329b9024427fa50f1033cfbbff9a8e143b88b4fe20a9b/dns_checker_cli-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "682296b1a926b5ec3d291438afbc96d768c75745197b1c01408d523bd4952ba0",
"md5": "cb72b50a1a831eeefeda9fa6f2da38fd",
"sha256": "7826a52248e0a8533504a026e5e9e267fefceedc054bb47fd6ae5be346833253"
},
"downloads": -1,
"filename": "dns_checker_cli-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "cb72b50a1a831eeefeda9fa6f2da38fd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 16208,
"upload_time": "2025-10-10T02:53:05",
"upload_time_iso_8601": "2025-10-10T02:53:05.079516Z",
"url": "https://files.pythonhosted.org/packages/68/22/96b1a926b5ec3d291438afbc96d768c75745197b1c01408d523bd4952ba0/dns_checker_cli-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-10 02:53:05",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jinwoo-j",
"github_project": "dns-checker",
"github_not_found": true,
"lcname": "dns-checker-cli"
}