<%@ LANGUAGE = PerlScript%> PerlScript utility to view source code
ActiveState PerlScript

A PerlScript utility to view Server Side Source

<% $filename = $Request->querystring('filename')->item; $URL= $Request->querystring('URL')->item; %>

HTML Source for: <%=$URL%>

<%
	# make sure filename does not contain any path info
	$_ = $filename;
	if (/[\/\\]/) {
		%> Error in filename <%= $filename %> <%
	}
	else {
		# get path of this file
		$path = $Request->ServerVariables('PATH_TRANSLATED')->item;
		$path =~ s/[\/\\](\w*\.asp\Z)//m;
		# make path to look at
		$filename = substr $path.'\\'.$filename, 0, 100;

		open(SOURCE, $filename);
		while() {
			s//>/g;
			s/<%/<%/g;
			s/%>/<\/b>%>/g;
			$Response->write($_);
		}
		close(SOURCE);
	}	# else valid filename
%>

Return

<% $url = $Request->ServerVariables('PATH_INFO')->item; $params = 'filename=showsource.asp&URL='."$url"; $params =~ s#([^a-zA-Z0-9&_.:%/-\\]{1})#uc '%' . unpack('H2', $1)#eg; %>

view showsource.asp itself