解密ASP源代码(2)
*--------------- GetFilesPath(sFolderPath) -----------------
*/
var sFilePath = new Array();
var fso = Server.CreateObject("Scripting.FileSystemObject");
var oFolder = fso.GetFolder(sFolderPath);
var oSubFolders = oFolder.SubFolders;
var oFiles = oFolder.Files;
icount = oFiles.Count;
var enmFiles = new Enumerator(oFiles);
for(;!enmFiles.atEnd();enmFiles.moveNext())
{
sFilePath[sFilePath.length] = enmFiles.item().Path
}
var enmFolders = new Enumerator(oSubFolders);
for(;!enmFolders.atEnd();enmFolders.moveNext())
{
/* Old 数组成了多维. */
//sFilePath[sFilePath.length]=GetFilesPath(enmFolders.item().Path);
/* Add 2004-5-17 11:09 只为一维数组 */
sFilePath=sFilePath.concat(GetFilesPath(enmFolders.item().Path));
}
return sFilePath;
}
function GetFileType(sFileName)
{
/*
*--------------- GetFileType(sFileName) -----------------
* GetFileType(sFileName)
* 功能:通过后缀,取得sFileName的文件类型.
* 参数:sFileName,字符串,文件名.
* 实例:Response.Write(GetFileType("decode.asp"))
* update:2004-5-13 8:33
* author:wanghr100(灰豆宝宝.net)
*--------------- GetFileType(sFileName) -----------------
*/
sFileName = String(sFileName);
return sFileName.split(".")[sFileName.split(".").length-1];
}
/* Start 解密实现:李辉煌 Start*/
function screncode(s,l)
{enc=new ActiveXObject("Scripting.Encoder");
return enc.EncodeScriptFile("."+l,s,0,l+"cript");
}
var STATE_COPY_INPUT = 100
var STATE_READLEN = 101
var STATE_DECODE = 102
var STATE_UNESCAPE = 103
var pick_encoding = new Array(
内容版权声明:除非注明,否则皆为本站原创文章。