本文介绍了如何查询DNS - nslookup的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



通过使用.NET类,如何在不使用命令提示符窗口的情况下完成以下nslookup命令:



Hi all,

By making use of .NET classes, how can I accomplish the following nslookup command without making use of the command prompt window:

C:\Users\userA>nslookup
Default Server:  server.domain.local
Address:  192.168.0.1
> set type=srv
> _ldap._tcp.domain.local
Server:  server.domain.local
Address:  192.168.0.1
_ldap._tcp.domain.local  SRV service location:
          priority       = 1
          weight         = 1
          port           = 0
          svr hostname   = requiredServerName.domain.local
requiredServerName.domain.local  internet address = 192.168.0.2
>





非常感谢提前。

亲切的问候,



Many thanks in advance.
Kind regards,

推荐答案


DnsQueryRequest request = new DnsQueryRequest();
            DnsQueryResponse response = request.Resolve("192.168.0.1", "_ldap._tcp.domain.local", DnDns.Enums.NsType.SRV, DnDns.Enums.NsClass.ANY, System.Net.Sockets.ProtocolType.Tcp);





亲切问候,



Kind regards,


这篇关于如何查询DNS - nslookup的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-13 21:44