@@ -10,6 +10,7 @@ const char bios_head[32]=
|
||||
char buff[0xffffff];
|
||||
char id[32];
|
||||
char outputdir[256];
|
||||
char inputdir[256];
|
||||
char chack_str(const char *a,char *b,int len)
|
||||
{
|
||||
int c;
|
||||
@@ -40,7 +41,7 @@ void tryunlock(char *dir)
|
||||
printf("ERROR. Not Bios File\n");
|
||||
}else
|
||||
{
|
||||
printf("try it..\n");
|
||||
//printf("try it..\n");
|
||||
if(fseek(bios,0xf00,SEEK_SET))
|
||||
{
|
||||
printf("ERROR. -0\n");
|
||||
@@ -55,6 +56,7 @@ void tryunlock(char *dir)
|
||||
{
|
||||
outputdir[a]=0;
|
||||
}
|
||||
printf("id: %s \n",id);
|
||||
sprintf(outputdir,"%s%s",dir,"_unlock.bin");
|
||||
printf("Output flie %s",outputdir);
|
||||
output_bios=fopen(outputdir,"wb");
|
||||
@@ -67,11 +69,13 @@ void tryunlock(char *dir)
|
||||
fclose(output_bios);
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
printf("\n\n");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fclose(bios);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
@@ -109,8 +113,24 @@ int main(int argc, char *argv[])
|
||||
printf("\n");
|
||||
|
||||
printf("\n");
|
||||
|
||||
while(1)
|
||||
{
|
||||
printf("请输入Bios文件路径,可通过拖拽文件到窗口快速输入,输入exit退出。\ndir:");
|
||||
for(a=0;a<256;a++)
|
||||
{
|
||||
inputdir[a]=0;
|
||||
}
|
||||
scanf("%s",inputdir);
|
||||
if(chack_str("exit",inputdir,4)==0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
tryunlock(inputdir);
|
||||
}
|
||||
|
||||
//printf("have %d file\n",argc-1);
|
||||
//printf(argv[1]);
|
||||
system("pause");
|
||||
//system("pause");
|
||||
return 0;
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user