//*******************************************************************************************
//************************Shut Down! BY WangKe.Automation.WUST.2012.10***********************
//******************This program will only be executed effectively for once.*****************
//*************************You can't run it for the second time.*****************************
#include <stdio.h>
#include <string.h>
#include <windows.h>
#include <stdlib.h>
int main()
{
int i = 1;
int j = 0;
static int c = 0;
FILE *fp;
fp = fopen("wangke.txt","a+");
c = getc(fp);
fclose(fp);
if(c == EOF)
{
char combi[10];
printf("Please input the passwords:\n");
scanf("%s",combi);
if(!strcmp(combi,"wangke"))
{
Sleep(1000);
printf("\n\n\n\n\n\n\n\n\t\t\t WELCOME ");
Sleep(1000);
printf("TO ");
Sleep(1000);
printf("MY ");
Sleep(1000);
printf("WORK.\n");
Sleep(2*1000);
printf("\t\t\t\t\tLoaded by WangKe\n");
Sleep(2*1000);
printf("\n\n\n\n\n\n");
}
else
{
printf("Password error,");
}
while(strcmp(combi,"wangke"))
{
printf("please input the password correctly:\n");
scanf("%s",combi);
if(!strcmp(combi,"wangke"))
{
Sleep(1000);
printf("\n\n\n\n\n\n\n\n\t\t\t WELCOME ");
Sleep(1000);
printf("TO ");
Sleep(1000);
printf("MY ");
Sleep(1000);
printf("WORK.\n");
Sleep(1000);
printf("\t\t\t\t\tLoaded by WangKe\
n");
printf("\n");
break;
}
else
{
if(i == 1)
{
printf("Do you want to crack my password?Give it up!\nyou can only have one more chance now.\n");
Sleep(4*1000);
}
if(i == 2)
{
printf("Now you only have the last chance.\n");
Sleep(4*1000);
}
if(i == 3)
{
printf("GAME OVER.\n");
Sleep(2*1000);
break;
}
i++;
}
}
if(i<3)
{
c = 8;
printf("Now don't close the dos window.\n");
Sleep(1000);
fp = fopen("wangke.txt","a+");
putc(c,fp);
fclose(fp);
printf("Please wait:\n");
Sleep(3*1000);
printf("3\n");
Sleep(1000);
printf("2\n");
Sleep(500);
printf("1\n\n");
Sleep(2000);
for(j=0;j<2000;j++)
printf("\n");
printf("Congratulations! Your computer have now been changed.\n\n");
Sleep(2*1000);
printf("For the solution,\n\n");
Sleep(2*1000);
printf("Please visit my CSDN blog for more information.\nhttp://blog.csdn.net/Automagically\n\n");
Sleep(2*1000);
printf("HAPPY EVERY DAY!MY DARLING!\n\n");
Sleep(2*1000);
system("shutdown/r");
Sleep(59*1000);
}
}
else
{
printf("Please visit my CSDN blog for more information.\nhttp://blog.csdn.net/Automagically\n\n");
Sleep(8000);
system("shutdown/r");
Sleep(59*1000);
}
return 0;
}