Leon (@Leon.L)一个域名NS记录的检查脚本。。。 中发帖

主要是因为最近域名回收的事情太多,所以用ClaudeCode写了个脚本检查域名的NS记录有没有被修改。 
脚本同目录下要设置个domain.txt文件,每个域名一行。
#!/usr/bin/env python3
"""
NS记录检查脚本
从domain.txt文件读取域名列表,查询每个域名的NS记录并汇总显示
"""

import dns.resolver
import sys
from pathlib import Path


def read_domains(file_path):
"""读取域名列表文件"""
try:
with open(file_path, 'r', encoding='utf-8') as f:
domains = [line.strip() for line in f if line.strip(...