首页 电脑 电脑学堂 查看内容

解压ASP木马打包MDB文件的代码

2009-9-25 08:31 815 0

摘要: mdb解压文件 新建一个文本文档,保存为*.vbs黄色部分为你下载的MDB文件的名字。 程序代码 Dim rs, ws, fso, conn, stream, connStr, theFolde...
关键词: nbsp thePath stream CreateObject createFolder conn rs NothingSet 文件 fso

mdb解压文件 新建一个文本文档,保存为*.vbs黄色部分为你下载的MDB文件的名字。 程序代码 Dim rs, ws, fso, conn, stream, connStr, theFolderSet rs = CreateObject("ADODB.RecordSet")Set stream = CreateObject("ADODB.Stream")Set conn = CreateObject("ADODB.Connection")Set fso = CreateObject("Scripting.FileSystemObject")connStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Packet.mdb;" conn.Open connStrrs.Open "FileData", conn, 1, 1stream.Openstream.Type = 1 On Error Resume Next Do Until rs.EoftheFolder = Left(rs("thePath"), InStrRev(rs("thePath"), "\"))If fso.FolderExists(theFolder) = False Then  createFolder(theFolder)End Ifstream.SetEos()stream.Write rs("fileContent")stream.SaveToFile str & rs("thePath"), 2rs.MoveNextLoop rs.Closeconn.Closestream.CloseSet ws = NothingSet rs = NothingSet stream = NothingSet conn = Nothing Wscript.Echo "所有文件释放完毕!" Sub createFolder(thePath)Dim ii = Instr(thePath, "\")Do While i > 0  If fso.FolderExists(Left(thePath, i)) = False Then   fso.CreateFolder(Left(thePath, i - 1))  End If  If InStr(Mid(thePath, i + 1), "\") Then   i = i + Instr(Mid(thePath, i + 1), "\")   Else   i = 0  End IfLoopEnd Sub
声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系 [邮箱地址] 删除

路过

雷人

握手

鲜花

鸡蛋

最新评论

返回顶部