DNS plugin for Take Command / TCC / TCC/LE

Version 1.0.9     2025-03-26

Charles Dye

Purpose:

This plugin provides a replacement for TCC’s internal DNS command. It also adds an RDNS command, because why not.

Installation:

To use this plugin, copy Dns.dll to some known location on your hard drive. (If you are still using the 32-bit version of Take Command, take Dns-x86.dll instead of Dns.dll.) Load the .DLL file with a PLUGIN /L command, for example:

plugin /l c:\bin\tcmd\test\dns.dll

If you copy the .DLL file to a subdirectory named PlugIns within your Take Command program directory, it will be loaded automatically when TCC starts.

Plugin Features:

New Commands:
DNSRDNS

Syntax Note:

The syntax definitions in the following text use these conventions for clarity:

BOLD CODEindicates text which must be typed exactly as shown.
CODEindicates optional text, which may be typed as shown or omitted.
Bold italicnames a required argument; a value must be supplied.
Regular italicnames an optional argument.
ellipsis…after an argument means that more than one may be given.

Examples are shown in a gray box:

rem   This is an example:
rdns 142.250.190.142


Some command options take an argument. These are shown with a colon between the option and its argument: /A:arg

If you like, you may substitute an equals sign for the colon: /A=arg This is handy if the arg is a filename, and you want to use tab completion to enter the filename.

Or you can omit the colon: /Aarg

New Commands:

DNS — Display DNS records for a domain or host.

Syntax:
DNS /K /N:flags /P /S /W server name…

/Kshow the number of records returned
/N:flagsdisable features:
    C — disable highlight
    H — do not show headers
    N — do not show names in headers
/Ppage output
/Ssort DNS records of the same type
/Wtruncate long TXT strings
serverthe DNS server to query, or * for default
name…domain name or hostname to look up

You must specify the server, and at least one name to look up. If you specify * for the server, DNS will use your system’s default DNS servers. You may specify more than one name to look up.

• Note: All options except for /NH are new, and not compatible with TCC’s internal DNS command. Giving more than one name per call is also a new feature; to be compatible with TCC’s DNS, give only one name per command.

dns * ipv6.google.com



RDNS — Perform a reverse DNS lookup.

Syntax:
RDNS /A:dnsaddr ipaddr…

/A:dnsaddrDNS server address
ipaddrthe IP address to look up

You must give at least one ipaddr to look up. If you do not specify a DNS server, RDNS will use your system’s default DNS servers.

rdns 152.19.134.47



Paging Options:

The DNS command has a /P option to page output. This option supports two suboptions:

/P:time,lines

timetime in seconds, or (with a trailing M) milliseconds
linesnumber of lines to display before pausing

Both time and lines are optional. The colon is not required, but you must use the comma if you want to specify lines.

rem  Scroll every ten seconds:
type /p:10 myfile.txt

rem  Display ten lines at a time:
type /p:,10 myfile.txt

rem  Display twenty lines at a time, and
rem    scroll every 2.5 seconds:
type /p:2500m,20


At the “Press a key to continue” prompt, most keys will advance by another screenful (or lines). But a few keys behave differently:

A or Cturns off paging, and scrolls continuously
Esc or Ctrl-Caborts the current command
/scrolls half a screen, or half of lines
1 to 9scrolls that many lines, e.g. 3 scrolls three lines

Highlight Variable:

The DNS command features highlighted output. You can customize this feature by setting an environment variable Highlight:

rem  Disable highlight:
set highlight=none

rem  Set the highlight foreground:
set highlight=bright cyan

rem  Set both foreground and background:
set highlight=bri whi on blu

rem  Numbers are also supported:
set highlight=46


If the Highlight environment variable is not defined, the plugin will check the registry for a value named Highlight of type REG_SZ. The plugin will search, in this order:

•  HKEY_CURRENT_USER\Software\JPPlugins\DNS(affects this plugin only)
•  HKEY_CURRENT_USER\Software\JPPlugins(affects several of my plugins)

DNS also has a /NC option to disable highlighting.

Startup Message:

This plugin displays an informational line when it initializes. The message will be suppressed in transient or pipe shells. You can disable it for all shells by defining an environment variable named NOLOADMSG, for example:

set /e /u noloadmsg=1

Status and Licensing:

Consider this beta software. It may well have issues. Try it at your own risk. If you find a problem, you can report it in the JP Software support forum.

DNS is currently licensed only for testing purposes. I may make binaries and source code available under some free license once I consider it ready for use.

Download:

You can download the current version of this plugin from https://charlesdye.net/dl/dns.zip.