A Birds Eye View of a Whois Script

In my last post, I showed the code for a "hello world" script supported by the soon to be released Alintex Script .NET 1.1.

Before discussing some specific product features, I though I might provide a birds eye view of a slightly more useful script - one that say, looks up a registrant on a whois server. I'll leave a discussion of the code for another day, however it can be seen in the Portable Script File Description mentioned at the end of this post.

Because Alintex Script supports multiple script files in different languages within one script, I can break out the functionality into different script files. In this case I'll put most of the functionality in a C# script file and create a separate VB.NET script which implements a Windows Form for output. That way I can reuse the Windows Form in other scripts.

The result of my coding efforts are the two script files shown below. The csx extension indicates that this is a shell executable file and also that this is a non-standard C# file.

How do you run this script and look up 'microsoft.com'? Well one way is to type the following at a command prompt...

> axwscript /a:microsoft.com whois.csx textdialog.vb

The /a (argument) option stops Alintex Script from assuming microsoft.com is a file. The result is reasonably predictable...

Mind you, Alintex Script provides language extensions which allow one to produce a single script that is supported on the console, through a Windows interface and in an unattended mode through what is called the Gui/Cui/Unattended (GCU) design pattern.

It means that I can type the following...

> axwscript whois.csx textdialog.vb

which will result in me being prompted for the information required...

entering 'microsoft.com' displays that VB form...

OK, what if I want to give this file to someone else, and what if I want to include some author and script information? You can do that too.

Alintex Script lets one pack scripts, settings and author information into a Portable Script File. In this case I would type the following:-

> axwscript /pack:whois.psf whois.csx textdialog.vb

The result is a script file named 'whois.psf' which can be run from the command line as well as by clicking on it's icon.

One can get a summary of the contents in a Portable Script File by using the /info option...

> axwscript /info whois.psf

Doing so will display script information in your browser...

Please note that Alintex Script .NET 1.1 has not yet been released and is not available from the Alintex web site.

Update: code is now available from http://www.alintex.com/scripts-exe.aspx

1 Comment

  • Good stuff, Alex. One ? ->You did a whois on microsoft.com and didn't get back a slew of sub-hosts ranging from microsoft.com.iscool.com to microsoft.com.ohmygoditburns.com? I used dns411 as the whois server, and those were consistent entries that I found ;)

Comments have been disabled for this content.