Class DnsClientAnswerSource
- Namespace
- Kuestenlogik.Bowire.Security.Scanner
- Assembly
- Kuestenlogik.Bowire.Security.Scanner.dll
Default IDnsAnswerSource — DnsClient.NET against the system resolvers, or an explicit server when the operator names one.
public sealed class DnsClientAnswerSource : IDnsAnswerSource
- Inheritance
-
DnsClientAnswerSource
- Implements
- Inherited Members
Constructors
DnsClientAnswerSource(int, string?)
public DnsClientAnswerSource(int timeoutSeconds = 10, string? server = null)
Parameters
timeoutSecondsintPer-query timeout. The scan's own
--timeoutflows in here so a black-holed nameserver cannot stall the whole run.serverstringOptional resolver address. Null uses the machine's configured nameservers.
Methods
QueryAsync(string, string, CancellationToken)
public Task<DnsProbeAnswer> QueryAsync(string name, string recordType, CancellationToken ct)
Parameters
namestringFully-qualified name to resolve.
recordTypestringA / AAAA / CNAME / TXT / MX / NS / SOA / PTR / …
ctCancellationTokenCancels the in-flight query.