#!/usr/local/bin/perl -w print STDOUT ("Content-type: text/html\n\n"); $ip="128.128.108.115"; $httpfile="/data9/apache/port80/conf/httpd.conf"; open (HTTP,$httpfile) || die "System error: Unable to process your request"; $srmfile="/data9/apache/port80/conf/srm.conf"; open (SRM,$srmfile) || die "System error: Unable to process your request"; print STDOUT ("\n"); print STDOUT ("\n"); print STDOUT (" Virtual Hosting & Redirection Report\n"); print STDOUT ("\n"); print STDOUT ("\n"); print ("

Virtual Hosting: $ip

\n"); $found=0; while () { if (//) { $found=1; } else { if ($found==1) { s/ServerName//g; print STDOUT ("$_","
"); } $found=0; } } close(HTTP); print ("

Redirections $ip:

\n"); while () { if (/ReDirect/) { s/ReDirect//g; s/http/\n
\t--> http/g; print STDOUT ("$_","
"); } } close(SRM); print STDOUT ("\n"); print STDOUT ("\n");