快速并发检查.co.za域的SOA DNS记录 [英] Fast concurrent checking of SOA DNS records for .co.za domains

查看:178
本文介绍了快速并发检查.co.za域的SOA DNS记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过检查 SOA 的存在,尽可能准确地实现 .co.za 域名的批量可用性检查 MX记录使用C#ASP.NET。

I want to implement bulk availability checking of .co.za domain names as accurately as possible by checking for the existence of SOA or MX records using C# ASP.NET.

我正在寻找一种解决方案,可以以正确利用的方式检查相关的DNS记录一直检查至少10个域名。

I am looking for a solution that can check for the relevant DNS records in a way that properly utilises threading to check at least 10 domains at a time.

唯一真正准确的检查.co.za域的可用性的方法是使用 http://co.za/whois.shtml ,但古老的WHOIS服务不允许批量检查并限制给定IP的连续检查。

The only truly accurate way of checking the availibility of a .co.za domain is to use http://co.za/whois.shtml, but the archaic WHOIS service does not allow bulk checking and limits consecutive checks for a given IP.

到目前为止,我已经通过使用古老的经典ASP脚本,使用旧的DNS库简单DNS解析器,由Emmanuel Kar tmann。然而,这种方法不能很好地扩展,我需要能够处理更多的用户使用正确的线程ASP.NET实现。

To date, I have gotten fairly accurate results by using my ancient classic ASP script utilising an old DNS library called "Simple DNS Resolver" by Emmanuel Kartmann. However, this approach does not scale well and I need to be able to handle more users with a properly threaded ASP.NET implementation.

我现在使用的调皮码现在看起来像这样:

The naughty code I'm using right now looks something like this:

Dim oDNS, pDomain, found_names

Set oDNS = CreateObject("Emmanuel.SimpleDNSClient.1")

oDNS.ServerAddresses = "127.0.0.1" // Set DNS server to use
oDNS.Separator = "," // Set separator for found_names multiple outputs

为每个域执行以下操作:

Execute the following for each domain:

Err.Clear // Reset error flag. I know, I hate it too.

oDNS.Resolve pDomain, found_names, "C_IN", "T_SOA" // Look for SOA records for domain

If Err <> 0 Then // No SOA records could be found.
    Err.Clear // Reset error flag
    oDNS.GetEmailServers pDomain, found_names // Look for MX records
    If Err <> 0 Then // No MX records found either
        AssumeDomainIsAvailable(pDomain);
    Else // Found some MX records
        DomainUnavailable(pDomain);
    End If

Else // Found some SOA records
    DomainUnavailable(pDomain);
End If

任何有关改进检测的建议都表示赞赏。这是我对SO的第一个问题,所以请原谅我的冗长和谢谢你宝贵的时间。

Any recommendation for improving detection is appreciated. This is my first question on SO, so forgive my verbosity and thanks for your precious time.

推荐答案

这将非常容易JH Software的 DNS客户端库for .NET

This would be very easy using JH Software's DNS Client Library for .NET:

var Response = JHSoftware.DnsClient.Lookup("example.com", 
                              JHSoftware.DnsClient.RecordType.SOA);

它还支持 BeginLookup / EndLookup 异步查找的方法。

It also supports BeginLookup / EndLookup methods for asynchronous lookups.

这篇关于快速并发检查.co.za域的SOA DNS记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆