看到了刚才错误的提示字符“错了”,还有嫌疑字符“pass!”,那我们找到pass字符所在的位置查看引用情况
while ( *(_DWORD *)(a1 + 4 * v4) < 62 && *(_DWORD *)(a1 + 4 * v4) >= 0 )
{
Str1[v4] = aAbcdefghiabcde[*(_DWORD *)(a1 + 4 * v4)];
++v4;
}
if ( strlen(Str) )
{
for ( i = 0; Str[i]; ++i )
{
if ( Str[i] > 57 || Str[i] < 48 )
{
if ( Str[i] > 122 || Str[i] < 97 )
{
if ( Str[i] > 90 || Str[i] < 65 )
sub_4017B0();
else
v5[i] = Str[i] - 29;
}
else
{
v5[i] = Str[i] - 87;
}
}
else
{
v5[i] = Str[i] - 48;
}
}
result = Check_Encryption((int)v5);
}
else
{
result = CWnd::MessageBoxA(v8, "请输入pass!", 0, 0);
}
v4 = 0;
v3 = 0;
while ( *(_DWORD *)(a1 + 4 * v4) < 62 && *(_DWORD *)(a1 + 4 * v4) >= 0 )
{
Str1[v4] = aAbcdefghiabcde[*(_DWORD *)(a1 + 4 * v4)];
++v4;
}
while ( *(_DWORD *)(a1 + 4 * v4) < 62 && *(_DWORD *)(a1 + 4 * v4) >= 0 )
{
Str1[v4] = aAbcdefghiabcde[*(_DWORD *)(a1 + 4 * v4)];
++v4;
}
Str1[v4] = 0;
if ( !strcmp(Str1, "KanXueCTF2019JustForhappy") )
result = Tip_Success();
else
result = sub_4017B0();
char encryption[] = "KanXueCTF2019JustForhappy";
char text[] = "abcdefghiABCDEFGHIJKLMNjklmn0123456789opqrstuvwxyzOPQRSTUVWXYZ";
for (int i = 0; i <= strlen(encryption); i++)
{
for (int j = 0; j <= strlen(text); j++)
{
if (encryption[i] == text[j])
{
//printf("%d--", j);
v5[i] = j;
}
}
for ( i = 0; Str[i]; ++i )
{
if ( Str[i] > 57 || Str[i] < 48 )
{
if ( Str[i] > 122 || Str[i] < 97 )
{
if ( Str[i] > 90 || Str[i] < 65 )
sub_4017B0();
else
v5[i] = Str[i] - 29;
}
else
{
v5[i] = Str[i] - 87;
}
}
else
{
v5[i] = Str[i] - 48;
}
}
for (int i = 0; i <= 26; i++)
{
if (48 <= (v5[i] + 48) && (v5[i] + 48) <= 57)
{
input[i] = v5[i]+48;
}
if (97 <= (v5[i] + 87) && (v5[i] + 87) <= 122)
{
input[i] = v5[i]+87;
}
if (65 <= (v5[i] + 29) && (v5[i] + 29) <= 90)
{
input[i] = v5[i] + 29;
}
}
#include
#include
int main()
{
int input[26] = { 1 };
int v5[26] = {1};
int Str[26] = { 1 };
char encryption[] = "KanXueCTF2019JustForhappy";
char text[] = "abcdefghiABCDEFGHIJKLMNjklmn0123456789opqrstuvwxyzOPQRSTUVWXYZ";
for (int i = 0; i <= strlen(encryption); i++)
{
for (int j = 0; j <= strlen(text); j++)
{
if (encryption[i] == text[j])
{
//printf("%d--", j);
v5[i] = j;
}
}
}
for (int i = 0; i <= 26; i++)
{
if (48 <= (v5[i] + 48) && (v5[i] + 48) <= 57)
{
input[i] = v5[i]+48;
}
if (97 <= (v5[i] + 87) && (v5[i] + 87) <= 122)
{
input[i] = v5[i]+87;
}
if (65 <= (v5[i] + 29) && (v5[i] + 29) <= 90)
{
input[i] = v5[i] + 29;
}
}
for (int i = 0; i < 26; i++)
{
printf("%c",input[i]);
}
return 0;