2018. 2. 15. 19:41ㆍ0x05 Crypto/hacker.org
input 값을 0과 1로 대체 후 hex 값 변환
#!python
flag = 'abbbabaaabbabaaaabbaababaabaaaaaabbaaaababbabbbaabbbaabbabbbabbbabbaabababbbaabaaabaaaaaabbabaababbbaabbaabaaaaaabbaaaababbaabaaabbbabababbabbababbaaabaabbbaabaabbaaaababbbabaaabbaabab'
print flag.replace('a','0')
flag = flag.replace('a','0')
print flag.replace('b','1')
#include <string.h>
int main()
{
int cnt = 0;
int flag = 0;
char arr[] = "0111010001101000011001010010000001100001011011100111001101110111011001010111001000100000011010010111001100100000011000010110010001110101011011010110001001110010011000010111010001100101";
printf("%d\n", strlen(arr));
for (int i = 0; i < sizeof(arr) / sizeof(arr[0]); i++)
{
if (flag == 7 )
{
cnt++;
printf("%c ", arr[i]);
flag = 0;
}
else {
printf("%c", arr[i]);
flag++;
}
}
printf("cnt = %d\n", cnt);
}
"74686520616E73776572206973206164756d6272617465".decode("hex")
'the answer is adumbrate'
'0x05 Crypto > hacker.org' 카테고리의 다른 글
Challenge 'Didactic Vampire Text' (0) | 2018.02.15 |
---|---|
Challenge 'Didactic RGB' (0) | 2018.02.15 |
Challenge 'Didactic XOR Cipher' (0) | 2018.02.15 |
Challenge 'Didactic XOR' (0) | 2018.02.15 |
Challenge 'Didactic Text' (0) | 2018.02.15 |