diff --git a/main.c b/main.c index ad12ef3..93b63be 100644 --- a/main.c +++ b/main.c @@ -3,10 +3,84 @@ /* run this program using the console pauser or add your own getch, system("pause") or input loop */ -int main(int argc, char *argv[]) { - - printf("have %d file\n",argc-1); - //printf(argv[1]); - getchar(); +const char bios_head[32]= +{ +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x5A,0xA5,0xF0,0x0F,0x03,0x00,0x04,0x03,0x06,0x02,0x10,0x15,0x20,0x01,0x21,0x00 +}; +char buff[1024*1000*16]; +char id[32]; + +char chack_str(const char *a,char *b,int len) +{ + int c; + for(c=0;c1) + { + while(argc>1) + { + + argc--; + printf("Input flie %s\n",argv[argc]); + tryunlock(argv[argc]); + } + printf("\n"); + }else + { + printf("联想ThinkPad Bios超级密码解锁程序\n\n使用方法:\n"); + printf("1 使用编程器将原机Bios读出\n"); + printf("2 将读出的内容以二进制格式bin保存\n"); + printf("3 将bin文件拖进本程序,程序会自动生成解锁Bios,(支持批量拖入)\n"); + printf("4 将生成的解锁bios刷入,然后开机,按F1进入Bios,将超级密码改成空密码,按F10保存\n"); + printf("5 完成! 注意,部分Bios芯片写入之前要先清空,否则无法校验通过。\n\n\n"); + printf("编写 吴文峰 邮箱 kevin@lmve.net \n\n"); + printf("项目地址 https://git.lmve.net/summary/thinkpad_unlock_bios.git \n!!!请勿商用!!!\n\n"); + return 0; + } + printf("\n"); + //printf("have %d file\n",argc-1); + //printf(argv[1]); + system("pause"); return 0; } diff --git a/main.exe b/main.exe new file mode 100644 index 0000000..d55f04d Binary files /dev/null and b/main.exe differ diff --git a/test/X250_bios2_unlock.bin b/test111/X250_bios2_unlock.bin similarity index 100% rename from test/X250_bios2_unlock.bin rename to test111/X250_bios2_unlock.bin diff --git a/test/x250_bios1.bin b/test111/x250_bios1.bin similarity index 100% rename from test/x250_bios1.bin rename to test111/x250_bios1.bin diff --git a/test/x250_bios2.bin b/test111/x250_bios2.bin similarity index 100% rename from test/x250_bios2.bin rename to test111/x250_bios2.bin diff --git a/thinkpad_unlock_bios.layout b/thinkpad_unlock_bios.layout new file mode 100644 index 0000000..d3a9ff1 --- /dev/null +++ b/thinkpad_unlock_bios.layout @@ -0,0 +1,2 @@ +[Editors] +Order=