DnsClient.NET | simple yet very powerful and high performant open source | DNS library
kandi X-RAY | DnsClient.NET Summary
kandi X-RAY | DnsClient.NET Summary
DnsClient.NET is a simple yet very powerful and high performance open source library for the .NET Framework to do DNS lookups.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of DnsClient.NET
DnsClient.NET Key Features
DnsClient.NET Examples and Code Snippets
Community Discussions
Trending Discussions on DnsClient.NET
QUESTION
I am using this c# librabry for nslookup to find nameservers of domains.Here is my c# code
...ANSWER
Answered 2017-Mar-13 at 20:10You need to change your regex expression from
var record = Regex.Match(nameServer.ToString(), @"ns\d"+ "."+ item).Value;
to:
var record = Regex.Match(nameServer.ToString(), @"ns\d+"+ "."+ item).Value;
When you add a plus symbol to \d, you are looking for one or unlimited digits.
You can use Regex101 for checking your regular expressions.
UpdateI am a bit surprised that this solution didn't help you, so I tried to fix your code.
In my example, the input was google.es, so in the following code:
foreach (var item in domains)
, item=="google.es"
and the DNS answer was:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install DnsClient.NET
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page