Collection of tools and scripts for various tasks
A cross-platform command-line application to verify DNS TXT records. Works on macOS, Windows, and Linux.
- ✅ Verify TXT record existence
- ✅ Compare actual vs expected values
- ✅ Support for multiple TXT records on the same domain
- ✅ Clear success/failure reporting
- ✅ Detailed error messages
- ✅ Cross-platform (macOS, Windows, Linux)
Prerequisites: Python 3.6 or higher
- Install dependencies:
pip install -r requirements.txt- Make the script executable (macOS/Linux):
chmod +x verify_txt_record.pyBasic Usage:
python verify_txt_record.py <record_name> <expected_value>Examples:
Verify an SPF record:
python verify_txt_record.py example.com "v=spf1 include:_spf.google.com ~all"Verify a DMARC record:
python verify_txt_record.py _dmarc.example.com "v=DMARC1; p=reject;"Verify a domain verification record:
python verify_txt_record.py verification.example.com "google-site-verification=ABC123"Options:
-v, --verbose: Show all TXT records found, even if verification succeeds--version: Show version information-h, --help: Show help message
0: Verification successful (TXT record exists and matches expected value)1: Verification failed (record not found, value mismatch, or DNS error)
Success:
Verifying TXT record for: example.com
------------------------------------------------------------
✓ TXT record verified successfully
Record: example.com
Value: v=spf1 include:_spf.google.com ~all
------------------------------------------------------------
Value Mismatch:
Verifying TXT record for: example.com
------------------------------------------------------------
✗ TXT record value mismatch
Record: example.com
Expected: v=spf1 wrong-value
Found:
[1] v=spf1 include:_spf.google.com ~all
------------------------------------------------------------
Domain Not Found:
Verifying TXT record for: nonexistent.example.com
------------------------------------------------------------
✗ Verification failed: Domain 'nonexistent.example.com' does not exist
------------------------------------------------------------
Apache License 2.0