ASP Source Code:
<!--#INCLUDE FILE="clsColorVBS.asp"-->
<B>ASP Source Code:</B>
<HR size=1 noshade>
<%
Dim objFSO, objInFile 'object variables For file access
Dim strIn, strTemp 'String variables For reading And color processing
Dim I 'standard Loop control variable
Dim strFileName 'String containing filename of ASP file To view
Dim ProcessString 'flag determining whether Or Not To output Each line

' We don't start showing code till we find the start script comment
ProcessString = 0

' Get file name from query String
strFileName = Request.QueryString("file")

' Conditional limiting use of this file To current directory
If InStr(1, strFileName, "\", 1) Then strFileName = ""
If InStr(1, strFileName, "/", 1) Then strFileName = ""

' Set the default so it shows itself If Nothing Or an invalid
' path Is passed In. Delete the following line To just display
' a message.
If strFileName = "" Then strFileName = "source.asp"

If strFileName <> "" Then
    Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
    Set objInFile = objFSO.OpenTextFile(Server.MapPath(strFileName),1,False)

    'Response.Write "<PRE>" & vbCRLF
    ' Loop Through Real File And Output Results To Browser
    'Do While Not objInFile.AtEndOfStream
    '    strIn = Server.HTMLEncode(objInFile.ReadLine)        
    '    Response.Write strIn & vbCRLF
    'Loop
    'Response.Write "</PRE>" & vbCRLF
    
    strCode = objInFile.ReadAll
    
    ' Close file And free variables
    objInFile.Close
    Set objInFile = Nothing
    Set objFSO = Nothing
    
    
    Set ColorVBS = New clsColorVBS
    ColorVBS.VBS = strCode
    Response.Write ColorVBS.HTML()
    Set ColorVBS = Nothing
Else
    ' If they entered no filename Or one With a / Or \ ... deny access
    Response.Write "Sorry, but you Do Not have access To view files outside the current directory."
End If
%>