#!/usr/bin/perl
# Utility script to convert whois2 to whois2.cgi. GPL.

while (<>) {
	last if /End common code/;
	print;
}

print <<'EOT';

use CGI;
my $cgi = new CGI;
my $domain = $cgi->param('domain');
my $server = 'whois.crsnic.net';

print <<EOH;
Content-Type: text/plain


EOH

while ($server = whoisit($server, $domain)) {}

EOT
