⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pwfinder.c

📁 Award Bios 密码大揭秘!!! 计算机系统安全与维护编程典型实例解析
💻 C
字号:
 #include <stdio.h>
 unsigned char readcmos(unsigned char off)
 {
  outportb(0x70,off);
  return inportb(0x71);
}
main()
   {
     static char pw[8]="";
     int i[8],j[8],l;
     long count=0;
     int k;
     unsigned int t;
     unsigned char *p;
     unsigned value;
     p=&value;
     printf("\nAward Password finder");
     printf("\nWhat kind of password do you want to find: \n1 supervisor password \n2 userpassword\n");
     scanf("%d",&k);
     if (k==1)
       {
	p[0]=readcmos(0x1c);
	p[1]=readcmos(0x1d);
       } else
       {
	p[0]=readcmos(0x64);
	p[1]=readcmos(0x65);
       }
     //printf("%x %x",p[0],p[1]);
     printf("\nThe range of the password do you to find:(1--8) \n 5 mean find the password form 1 bit to 5 bits");
     printf("\n5 is enough,5 to 8 will take long time. use CTRL+C to break! \nplease enter the number:");
     scanf("%d",&k);
     for (l=0;l<=8;l++)
	j[l]=l<k?32:127;

   for (i[7] =127;i[7]>=j[6];i[7]--)
    for (i[6]=i[7];i[6]>=j[6];i[6]--)
     for (i[5]=i[6];i[5]>=j[5];i[5]--)
       for (i[4]=i[5];i[4]>=j[4];i[4]--)
	 for (i[3]=i[4];i[3]>=j[3];i[3]--)
	  for (i[2]=i[3];i[2]>=j[2];i[2]--)
	    for (i[1]=i[2];i[1]>=j[1];i[1]--)
	      for (i[0]=126;i[0]>=j[0];i[0]--)
		     {
     for (k=0;k<8;k++)
      if (i[k]==127)
	{ pw[k]=0;break;}
	 else  pw[k]=i[k];

     t=0;
     for (l=0;l<k;l++)
      {
	asm ROL t,2
	t+=pw[l];
      }
     if (t==value)
       printf("Count:%ld  Password:%s\n",++count,pw);
    }
   if (!count)
      printf("\nNot found! Using the bigger range!");
  }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -