LassoScript Utility
Basics Browse Detail

[DNS_Response]

Tag Link [DNS_Response] Category Utility
Type Substitution Source Available Yes
Support Preferred Version 8.5
Change New Data Source Any
Output Type DNS_Response Security None
Implementation LassoScript Sets Lasso 8.5

Description

[DNS_Response] is a helper type which is used to format both DNS requests and responses. Normally a value of this type will only be returned from the [DNS_Lookup] tag when -ShowRequest or -ShowResponse is specified. However, this type can also be used to parse raw DNS requests or response if necessary.

The tag accepts a single parameter which is a byte stream of the DNS request or response to be formatted. The parsed response can then be displayed in several different formats depending on which member tag is used.

[DNS_Response->Answer] wil return an array of answers for most DNS responses. Address lookups or reverse lookups will return an array of IP addresses or host names. MX record lookups wil return an array of pairs each with a priority and an IP address. Other lookups may return an array of strings or other data.

[DNS_Response->Format] formats the DNS request or response so it user readable. This is a good choice for displaying the results of a DNS query to a site visitor since it will include the answer as well as supporting details like the DNS server queried.

[DNS_Response->BitFormat] formats the DNS request or response as low-level data in a user readable format. This might be useful for debugging DNS operation.

[DNS_Response->Data] simply returns the data which was passed into the type. This tag is useful for getting either the raw request or response from the [DNS_Lookup] tag.

Syntax

[Var: 'myDNSResponse' = (DNS_Lookup: 'www.example.com')]

[$myDNSResponse->Answer]

[$myDNSResponse->Format]

[$myDNSResponse->BitFormat]

[$myDNSResponse->Data]

Parameters

No Parameters Required.

Examples

See the Lasso 8 Language Guide for examples of how to use this tag.