IgniteMe

bool __cdecl sub_4011C0(char *Str)
{
  int v2; // [esp+50h] [ebp-B0h]
  char Str2[32]; // [esp+54h] [ebp-ACh] BYREF
  int v4; // [esp+74h] [ebp-8Ch]
  int v5; // [esp+78h] [ebp-88h]
  size_t i; // [esp+7Ch] [ebp-84h]
  char v7[128]; // [esp+80h] [ebp-80h] BYREF

  if ( strlen(Str) <= 4 )
    return 0;
  i = 4;
  v5 = 0;
  while ( i < strlen(Str) - 1 )
    v7[v5++] = Str[i++];
  v7[v5] = 0;
  v4 = 0;
  v2 = 0;
  memset(Str2, 0, sizeof(Str2));
  for ( i = 0; i < strlen(v7); ++i )
  {
    if ( v7[i] >= 97 && v7[i] <= 122 )
    {
      v7[i] -= 32;
      v2 = 1;
    }
    if ( !v2 && v7[i] >= 65 && v7[i] <= 90 )
      v7[i] += 32;
    Str2[i] = byte_4420B0[i] ^ sub_4013C0(v7[i]);
    v2 = 0;
  }
  return strcmp("GONDPHyGjPEKruv{{pj]X@rF", Str2) == 0;
}

大致就是,大小写转换,然后进行异或,异或之后的东西等于那一串字符串

IgniteMe_第1张图片

对应写个脚本

str="GONDPHyGjPEKruv{{pj]X@rF"
t=[13, 19, 23, 17, 2, 1, 32, 29, 12, 2, 25, 47, 23, 43, 36, 31, 30, 22, 9, 15, 21, 39, 19, 38, 10, 47, 30, 26, 45, 12, 34, 4]
flag=[]
v3=0
for i in range(len(str)):
	flag.append(((ord(str[i])^t[i])-72)^85)
	if flag[i] >= 65 and flag[i] <= 90:
		flag[i]+=32
	elif flag[i] >= 97 and flag[i] <=122:
		flag[i]-=32
print(''.join([chr(i) for i in flag]))
#wadx_tdgk_aihc_ihkn_pjlm

再加上

这个头

就对了

你可能感兴趣的:(java,算法,数据结构)