#include <stdio.h>
#include <string.h>
#include <conio.h>
#include <ctype.h>
void virus();
void avirus();
void leave();
void choice1();
void vhs();
void main()
{
textcolor(14);
clrscr();
char buffer[256]={0};
char password[]="vishal";
char c;
int pos=0;
printf (" ************");
textcolor(15);
cprintf("WELCOME");
printf("************");
printf ("\n\n *--------------");
textcolor(15);
cprintf("TO");
printf("-------------*");
printf ("\n\n *---------");
textcolor(15);
cprintf("THE WORLD OF");
printf("--------*");
printf ("\n\n ***************");
textcolor(15+BLINK);
cprintf("UVR2");
printf("************");
printf ("%s","\n\n\n\n\nPLEASE!!! ENTER THE PASSWORD TO PROCEED :: ");
do
{
c=getch();
if (isprint(c))
{
buffer[pos++]=c;
printf("%c",'*');
}
else if (c==8&&pos )
{
buffer[--pos]='\0';
printf("%s","\b \b");
}
}
while(c!=13&&pos<256);
if (!strcmp (buffer,password))
{
clrscr();
textcolor(3);
cprintf ("\n\n\n\n\n\n\n\n\n\n\n ACCESS GRANTED");
textcolor(3+BLINK);
cprintf(" !!!");
getch();
clrscr();
printf ("\n\n");
textcolor(15);
cprintf ("\n\n $$$$$$$$$$$$$$$-----WELCOME-----$$$$$$$$$$$$$$$");
printf("\n\n\n\n");
textcolor(BLUE+BLINK);
cprintf("\n !! ");
textcolor(4);
cprintf("* * * * * * * * * ");
textcolor(BLUE+BLINK);
cprintf(" !!");
textcolor(4);
cprintf("\r\n * * * * * * * *");
cprintf("\r\n * * * * * * * * ");
cprintf("\r\n * * * * * * * ");
cprintf("\r\n * * * ** * * * * * * ");
textcolor(14);
cprintf("\n\n\n\n\n\n\n\n\n\n\n PRESS ANY KEY TO ");
textcolor(14+BLINK);
cprintf("CONTINUE..... ");
textcolor(15);
getch();
vhs();
}
else
{
textcolor(BLUE);
cprintf ("\r\n\n\n\n ACCESS DENIED");textcolor(3+BLINK);cprintf("!!!");
printf ("\n\n YOU!!! DON'T HAVE PERMISSION TO PROCEED.");
choice1();
}
getch();
}
void vhs()
{
textcolor(15);
clrscr();
char choi;
clrscr();
printf (" PRESS");
textcolor(2+BLINK);
cprintf (" V ");
printf ("TO INJECT THE VIRUS!!!\n\n PRESS ");
textcolor(2+BLINK);
cprintf ("A ");
printf ("TO INJECT THE ANTI-VIRUS!!!\n");
printf ("\n PRESS ");
textcolor(2+BLINK);
cprintf ("E ");
printf ("TO EXIT! ");
printf ("\n\n\n\n\n\n\n\nEnter Your Choice:");
scanf ("%s",&choi);
switch (choi)
{
case 'v':
virus();
case 'V':
virus();
case 'a':
avirus();
case 'A':
avirus();
case 'e':
leave();
case 'E':
leave();
default:
printf ("\n\n\n YOU HAVE PRESSED THE WRONG KEY!!! ");
getch();
}
vhs();
getch();
}
void choice1()
{
char chos;
printf ("\n");
printf("\n PRESS ");
textcolor(2+BLINK);
cprintf("T ");
printf("TO TRY AGAIN.\n PRESS ");
textcolor(2+BLINK);
cprintf("E");
printf(" TO EXIT\n ");
printf ("\nEnter Your Choice :: ");
scanf ("%s",&chos);
switch (chos)
{
case 't':
main();
break;
case 'T':
main();
case 'e':
exit(0);
case 'E':
exit (1);
default:
printf ("\nYOU HAVE ENTERED THE WRONG CHOICE.");
getch();
clrscr();
printf (" ************WELCOME************");
printf ("\n\n *--------------TO-------------*");
printf ("\n\n *---------THE WORLD OF--------*");
printf ("\n\n ***************UVR2************");
printf ("%s","\n\n\n\n\nPLEASE!!! ENTER THE PASSWORD TO PROCEED :: ");
choice1();
}
}
void virus()
{
char d;
FILE *fp,*fp1;
char name[20];
char temp[20]={"Temp.txt"};
printf ("Enter The Filename To Inject(VIRUS):: ");
scanf ("%s",name);
fp=fopen(name,"rt");
if (fp==NULL)
{
printf ("\n\nThe Given File %s Can't Be Open!!!",name);
printf ("\n\nPOSSIBLE REASONS::-");
printf ("\n\n1. It doesn't exist.");
printf ("\n2. Used by another person or program.");
printf ("\n3. You don't have access right or permission to modify it.");
printf ("\n4. You have typed the incorrect spellings.");
getch();
vhs();
}
fp1=fopen(temp,"wt");
if (fp1==NULL)
{
printf ("\nThere's Some Problem With The Virus Injected File!!!!");
printf ("\nThis Program Now Will Get Terminated!!!!.........");
getch();
exit(2);
}
d=fgetc(fp);
while(d!=EOF)
{
fputc((d+name[0]),fp1);
d=fgetc(fp);
}
fclose (fp);
fclose (fp1);
remove (name);
rename (temp,name);
printf ("\n\nThe Given Filename, Has Been Affected!!!! ..........");
getch();
vhs();
}
void avirus()
{
char d;
FILE *fp,*fp1;
char name[20];
char temp[20]={"Temp.txt"};
printf("Enter The Filename To Inject(ANTI-VIRUS):: ");
scanf ("%s",name);
fp=fopen(name,"rt");
if (fp==NULL)
{
printf ("\n\nThe Given File %s Can't Be Open!!!",name);
printf ("\n\n\nThere's Some Problem With The Virus Injected File!!!!");
getch();
vhs();
}
fp1=fopen(temp,"wt");
if (fp1==NULL)
{
printf ("\nThere's Some Problem With The Virus Injected File!!!!");
printf ("\nThis Program Now Will Get Terminated!!!!.........");
getch();
exit(3);
}
d=fgetc(fp);
while(d!=EOF)
{
fputc(d-name[0],fp1);
d=fgetc(fp);
}
fclose (fp);
fclose (fp1);
remove(name);
rename(temp,name);
printf ("\n\nThe Given Filename, Has Been Cured!!!! ..............");
getch();
vhs();
}
void leave()
{
textcolor(15);
clrscr();
textcolor(2);
cprintf ("\n\n\n\n\n\n\n\n\n\n\n For further Details\n\r Please contact::
<vishal.sforu@gmail.com>");
getch();
clrscr();
textcolor(15);
clrscr();
textcolor(14);
cprintf ("\n\n\n\n\n\n\n\n GOD BLESS YOU!");
printf("\n\n\n\n\n\n\n\n\n\n\n HAVE A NICE DAY!");
textcolor(CYAN+BLINK);
cprintf("\r\n BYE BYE!!!!");
printf("\n END OF PROGRAM ..........................");
getch();
exit(4);
}
Submit ExpressSEO Tools
Search Engine Submission - AddMe
Meta Tags Generator - AddMe
Answer Questions at Unasked.com
Free Search Engine Submission
AddPro.comSearch
Engine Submission