资源描述:
《解密ASP源代码_》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、解密ASP源代码_从网上兴致冲冲地下载了ASP源代码,预备学习讨论的时候.一打开文件,天书般的加密代码.很让人郁闷吧:(在网上是找到了解密的方法,得一个文件挨一个文件地打开,复制,粘贴,解密,再复制,再粘贴,再保存......假如一个ASP程序有几百个文件???解决方法来了..复制代码代码如下:%@Language=JavaScript%%/**---------------decode.asp-----------------*功能:遍历某个名目下的全部文件,对加密过的.asp文件*进行解密,并写入源文件中.*实例:单个文件解密*Response.Write(DncodeFile
2、(Server.MapPath(conn.asp)));*实例:名目下全部文件解密.*DncodeFolderFiles(Server.MapPath(xml))*author:wanghr100(灰豆宝宝.net)*update:2021-5-1711:31*---------------decode.asp-----------------*/functionDncodeFile(sFilePath){/**---------------DncodeFile(sFilePath)-----------------*DncodeFile(sFilePath)*功能:打开文件sFi
3、lePath,Encode解密,重写该文件.*参数:sFilePath,字符串,文件的路径.*返回:sFilePath,文件的路径.*实例:Response.Write(DncodeFile(Server.MapPath(conn.asp)));*author:wanghr100(灰豆宝宝.net)*update:2021-5-170:58*---------------DncodeFile(sFilePath)-----------------*/varForReading=1,ForWriting=2,ForAppending=8;varfso=Server.CreateObj
4、ect(Scripting.FileSystemObject);varf=fso.OpenTextFile(sFilePath,ForReading,true);sFileText=f.ReadAll();f.Close();sDncodeText=strdec(sFileText)varf=fso.OpenTextFile(sFilePath,ForWriting,true);f.Write(sDncodeText);f.Close();//returnsDncodeText;returnsFilePath;}functionGetFilesPath(sFolderPath){/
5、**---------------GetFilesPath(sFolderPath)-----------------*GetFilesPath(sFolderPath)*功能:遍历sFolderPath名目下的全部文件.返回数组.存储文件路径.*参数:sFolderPath,字符串,名目肯定路径.*实例:Response.Write(GetFilesPath(Server.MapPath(xml)))*update:2021-5-128:33*author:wanghr100(灰豆宝宝.net)*---------------GetFilesPath(sFolderPath)--
6、---------------*/varsFilePath=newArray();varfso=Server.CreateObject(Scripting.FileSystemObject);varoFolder=fso.GetFolder(sFolderPath);varoSubFolders=oFolder.SubFolders;varoFiles=oFolder.Files;icount=oFiles.Count;varenmFiles=newEnumerator(oFiles);for(;!enmFiles.atEnd();enmFiles.moveNext()){sFil
7、ePath[sFilePath.length]=enmFiles.item().Path}varenmFolders=newEnumerator(oSubFolders);for(;!enmFolders.atEnd();enmFolders.moveNext()){/*Old数组成了多维.*///sFilePath[sFilePath.length]=GetFilesPath(enmFolders.item().Path);/*Add2021-5-1711:09只为