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

timeoutSeconds int

Per-query timeout. The scan's own --timeout flows in here so a black-holed nameserver cannot stall the whole run.

server string

Optional 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

name string

Fully-qualified name to resolve.

recordType string

A / AAAA / CNAME / TXT / MX / NS / SOA / PTR / …

ct CancellationToken

Cancels the in-flight query.

Returns

Task<DnsProbeAnswer>