#!/usr/bin/perl -w use strict; use CGI qw(param); my $cgi = new CGI; my @param = $cgi->param(); my $path = "/home/master/webroot/newdesign/scripts/"; my @source; error() unless @param; my $full = $path.$param[0]; if (-e $full) { open(FILE, "$full") || error(); @source = ; close(FILE); print "Content-type: text/html; charset=ISO-8859-1\n\n"; print < $param[0]
last for (@source) { print; print "
\n"; } print <
last2 }else{ error(); } sub error { print "Content-type: text/html; charset=ISO-8859-1\n\n"; print < Error!
There was an error while trying to post script source!
end exit(0); }