#!/usr/bin/perl -w
use strict;
use CGI;

my $query = new CGI;
my $s=$query->param('script');
$s=~s!\/|\\!!g;
print qq(content-type: text/html\n\n);
print qq(<html><head><title>$s source</title></head><body><b><a href="$s">$s</a> source</b><hr>);
open(FH,$s) or die;
my $i=1;
while(<FH>){
	s|<|\&lt\;|g;
	s|>|\&gt\;|g;
	s|\t|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|g;
	printf "<b>%.2d:</b>&nbsp;&nbsp;$_<br>",$i;
	$i++
}
close(FH);
print qq(<hr><a href="down.pl?script=$s">Download It!</a>);
print qq(</body></html>);