mixup
2 minutes to read
We are given a flag.txt
file that contains some Unicode characters. This is the hexdump of the file:
$ xxd flag.txt
00000000: 69e2 808e 63e2 80ae 74e2 808e 66e2 80ae i...c...t...f...
00000010: 7be2 808e e280 8e75 6e31 6330 e280 ae64 {......un1c0...d
00000020: 655f 6de2 80ae 3467 3163 5f6e 61e2 808e e_m...4g1c_na...
00000030: e280 ae68 e280 8e73 e280 ae64 e280 ae66 ...h...s...d...f
00000040: 6fe2 80ae e280 8e61 7369 e280 8e68 e280 o......asi...h..
00000050: aee2 80ae 6466 e280 8e61 736f 68e2 80ae ....df...asoh...
00000060: e280 8e64 666f 69e2 808e 6173 6864 66e2 ...dfoi...ashdf.
00000070: 808e e280 aee2 808e 6ae2 808e e280 ae6b ........j......k
00000080: e280 8e61 e280 8ee2 80ae e280 8e64 e280 ...a.........d..
00000090: 8e73 e280 aee2 80ae 6866 e280 aee2 808e .s......hf......
000000a0: 6c6a e280 ae61 64e2 80ae e280 8ee2 80ae lj...ad.........
000000b0: 73e2 80ae 66e2 808e 6864 736b 6ce2 80ae s...f...hdskl...
000000c0: 61e2 808e e280 ae68 e280 8e66 6ce2 80ae a......h...fl...
000000d0: e280 aee2 808e 6be2 80ae 686a e280 8ee2 ......k...hj....
000000e0: 808e e280 ae64 e280 8ee2 808e e280 aee2 .....d..........
000000f0: 80ae e280 ae61 e280 8ee2 808e 6673 7d0a .....a......fs}.
We can use some shell scripting to take the last column and remove al the .
characters, so that we get the flag:
$ xxd flag.txt | awk 'NF { print $NF }' | tr -d .\\n
ictf{un1c0de_m4g1c_nahsdfoasihdfasohdfoiashdfjkadshfljadsfhdsklahflkhjdafs}
Anyway, using a shell like Zsh, we can simply use cat
to show the flag:
$ cat flag.txt
ictf{un1c0de_m4g1c_nahsdfoasihdfasohdfoiashdfjkadshfljadsfhdsklahflkhjdafs}