#!/usr/bin/perl use CGI; $dnsdir = "/var/named/"; $comment = "Added_by_web_update"; $ENV{PATH} = '/bin:/usr/bin'; $query = new CGI; print "Content-type: text/html\n\n"; print $query->start_html(); $domain = $query->param('domain'); $command = "/usr/bin/grep $comment $dnsdir$domain"; @dnslook = `$command`; print "Entries added by dnscontrol:
"; print ""; foreach $line (@dnslook) { chomp $line; @lineparts = split /\s+/,$line; print ""; } print "
"; print @lineparts[0]; print ""; print @lineparts[4]; print "
";