首页 > 系统服务 > 详细

crackmehardestshell20110404 by xiayuanzhong

时间:2021-07-17 18:21:00      阅读:18      评论:0      收藏:0      [点我收藏+]

技术分享图片技术分享图片输入Name和Password,然后进行判断是否匹配

技术分享图片

反编译代码

 __main();
  Announcement();
  std::string::string((std::string *)v23);
  std::string::string((std::string *)v22);
  do
  {
    while ( 1 )
    {
      while ( 1 )
      {
        v20 = 1;
        printf("%s", "Please enter the Name: "); 
        std::operator>><char>(&std::cin, v23);				//3e6(16进制) = 998(10进制)
        if ( std::string::length((std::string *)v23) <= 0x3E6u )     //name长度 <=998   
        {
          printf("%s", "Please enter the Password: ");
          std::operator>><char>(&std::cin, v22);
          if ( std::string::length((std::string *)v22) <= 0x3E6u )	//Password长度 <=998
            break;
        }
        printf("To long! ReType!\n\n");
      }
      v21 = std::string::length((std::string *)v23);
      if ( v21 + 4 == std::string::length((std::string *)v22) )   //password长度 = name长度 + 4
        break;
      Error();
    }
    for ( i = 0; i < v21; ++i )
    {
      v18 = (_BYTE *)std::string::operator[](v23, i);
      if ( *v18 != *(_BYTE *)std::string::operator[](v22, v21 - i - 1) ) //Password的前几位为Name逆序
      {
        v4 = getMyChar(-1);
        v20 = turnToMyChar(v4);
        Error();
        break;
      }
    }
    if ( *(_BYTE *)std::string::operator[](v22, v21 + 3) != ‘z‘ )    //Password最后一位是‘z‘
    {
      v5 = getMyChar(-1);
      v20 = turnToMyChar(v5);
    }
    if ( *(_BYTE *)std::string::operator[](v22, v21) != ‘_‘ )		//Password倒数第四位为‘_‘
    {
      v6 = getMyChar(-1);
      v20 = turnToMyChar(v6);
    }
    if ( *(_BYTE *)std::string::operator[](v22, v21 + 1) != ‘x‘ )	//Password倒数第三位为‘x‘
    {
      v7 = getMyChar(-1);
      v20 = turnToMyChar(v7);
    }
    if ( *(_BYTE *)std::string::operator[](v22, v21 + 2) != ‘y‘ )	//Password倒数第二位为‘y‘
    {
      v8 = getMyChar(-1);
      v20 = turnToMyChar(v8);
    }
    v9 = getMyChar(v20);
    v17 = turnToMyChar(v9);
    v10 = getMyChar(0);
  }
  while ( v17 <= (__int16)turnToMyChar(v10) );
  v11 = getMyChar(v20);
  v16 = turnToMyChar(v11);
  v12 = getMyChar(0);
  if ( v16 > (__int16)turnToMyChar(v12) )
    Congratulations();
  system("PAUSE");
  std::string::~string(v13);
  std::string::~string(v14);
  return 0;
}

猜测Password的后四位为_xyz ,尝试后发现确实如此

总结一下:Password就是是将Name逆序后加上"_xyz"

EXP

Name = raw_input("[+] Enter your Name: ")

print "[+] The Password is " + Name[::-1] + "_xyz"

技术分享图片
技术分享图片
难得有能做出来的简单题 (ノへ ̄、)

crackmehardestshell20110404 by xiayuanzhong

原文:https://www.cnblogs.com/gtynb/p/15023192.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!