bredd / DnsQuery

C# DNS Query for TXT. Extensible to other record types.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DnsQuery

This is a C# Class to perform DNS lookups of TXT records. It would be easy to adapt to read other record types such as MX, SRV, or PTR.

Distributed as a CodeBit for easy incorporation into projects.

License

Licensed under a BSD 3-clause license.

Limitations and Opportunities

The DNS lookup is implemented through p/invoke to the Win32 DnsQuery system call. Therefore, it only works only on Windows. So, while this code can be complied for .Net Core or .Net Framework, it will only work when running on a Windows operating system.

A cross-platform .Net Core version would require implementing a DNS client rather than relying on the operating system. A promising option would be to use DNS over Https (DoH) thereby achieving greater security. Such an implementation would be limited to DoH servers but there are several available such as CloudFlare DoH, Google Public DNS, and Many Others.

About

C# DNS Query for TXT. Extensible to other record types.

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:C# 100.0%