标签:__int64 enc ever code ast for cal key put
int __fastcall encode(const char *a1, __int64 a2)
{
char v3[32]; // [rsp+10h] [rbp-70h]
char v4[32]; // [rsp+30h] [rbp-50h]
char v5[40]; // [rsp+50h] [rbp-30h]
int v6; // [rsp+78h] [rbp-8h]
int i; // [rsp+7Ch] [rbp-4h]
i = 0;
v6 = 0;
if ( strlen(a1) != key )
return puts("Your Length is Wrong");
for ( i = 0; i < key; i += 3 )
{
v5[i] = key ^ (a1[i] + 6);
v4[i + 1] = (a1[i + 1] - 6) ^ key;
v3[i + 2] = a1[i + 2] ^ 6 ^ key;
*(_BYTE *)(a2 + i) = v5[i];
*(_BYTE *)(a2 + i + 1LL) = v4[i + 1];
*(_BYTE *)(a2 + i + 2LL) = v3[i + 2];
}
return a2;
}
db="izwhroz\"\"w\"v.K\".Ni"
flag=‘‘
for i in range(0,18,3):
flag+=chr((18^ord(db[i]))-6)
flag+=chr((18^ord(db[i+1]))+6)
flag+=chr(18^ord(db[i+2])^6)
print(flag)
unctf{b66_6b6_66b}
标签:__int64 enc ever code ast for cal key put
原文地址:https://www.cnblogs.com/banpingcu/p/12813630.html