[CAUTION] ์คํฐ๋ - 13
๐ก Caution ์คํฐ๋ 13ํ์ฐจ
๋ฆฌ๋ฒ์ฑ
ida๋ก Input ๋ฌธ์์ด์ ์์น๋ฅผ ์ฐพ๋๋ค.
ํด๋น ํจ์ ๊ทผ์ฒ๋ฅผ ๋ถ์ํด ๋ณด๋ฉด ๋ค์ ๋ถ๋ถ์์ ๋ฌธ์์ด ๊ฒ์ฆ์ ํ๋ค.
signed __int64 __fastcall sub_140001000(__int64 a1)
{
int i; // [rsp+0h] [rbp-18h]
for ( i = 0; (unsigned __int64)i < 0x18; ++i )
{
if ( *(unsigned __int8 *)(a1 + i + 1) + *(unsigned __int8 *)(a1 + i) != byte_140003000[i] )
return 0i64;
}
return 1i64;
}
c์ธ์ด๋ก ์กฐ๊ธ ๋ ์ฝ๊ฒ ์ ๋ฆฌํ๋ฉด ๋ค์๊ณผ ๊ฐ๋ค.
// a๋ ์ฌ์ฉ์ input
for (int i = 0; i<24 ; i++){
if(a[i+1] + a[i] != result[i]){
return 0;
}
}
return 1;
์์ ๋ก์ง์ผ๋ก ์ฌ์ฉ์ input์ result์ ๊ฒ์ฌํ๊ณ ์์ผ๋ฉฐ, result๋ ๋ค์๊ณผ ๊ฐ๋ค.
๋ก์ง์ด ๊ฐ๋จํ๋ฏ๋ก ํ์ด์ฌ ์ฝ๋๋ฅผ ์ด์ฉํด์ ํด๊ฒฐํ๋ฉด ๋ค์๊ณผ ๊ฐ๋ค.
arr = [
0xad,0xd8,0xcb,0xcb,
0x9d,0x97,0xcb,0xc4,
0x92,0xa1,0xd2,0xd7,
0xd2,0xd6,0xa8,0xa5,
0xdc,0xc7,0xad,0xa3,
0xa1,0x98,0x4c,0x00
]
answer = []
answer.append(0x41)
for i in range(24):
tmp = arr[i] - answer[i]
answer.append(tmp)
print(answer)
for character in answer[:-1]:
print(chr(character),end='')
๋๊ธ๋จ๊ธฐ๊ธฐ