#!/usr/bin/perl

use CGI qw(:standard);

print header;

if (param()) {
   if (param(host)) {
      $host = param(host);
      $out = `host $host`;

      $out = "Host not found.\n" unless ($out ne "");
   
      print "<pre>\n",
            "$out\n",
            "</pre>\n";
   }
   else {
      print "Host not found.\n";
   }
}
else {

   print start_form,
         "Hostname/IP:   ",
         textfield('host','',16,128),
         submit('Lookup'),
         end_form;

}

exit;
   
   

