STDnsQuery
STDnsQuery 是一个快速DNS查询工具 其中 DnsClient 是一个方便快捷的调用类 支持 A、NS、CNAME、DNAME 查询 使用简单
CUI(GO):https://github.com/DebugST/STDnsQuery_GO
Demo
class Demo
{
public void Test() {
DnsClient dns = new DnsClient(new IPEndPoint[]{
new IPEndPoint(IPAddress.Parse("8.8.8.8"),53)
});
dns.DnsCompleted += new DnsClient.DnsCompletedEventHandler(dns_DnsCompleted);
dns.Start(1000);
dns.Query("www.google.com", DnsType.A, 1, 3);
}
void dns_DnsCompleted(object sender, DnsCompletedEventArgs e) {
if (e.Result.RCode == DnsRCode.None) {
Console.WriteLine(e.Result.Domain + "," + e.Result.Answers.Length);
}
}
}
Author
- Github: DebugST
- Blog: Crystal_lz
- Mail: (2212233137@qq.com)