# TASK 2 # chall 1: ![](https://i.imgur.com/lLwumeC.png) -> dựa vào kiến thức encoding của cryptohack f_block1: ![](https://i.imgur.com/Id2hNR4.png) f_block2: ![](https://i.imgur.com/ScTxzAF.png) f_block3: ![](https://i.imgur.com/8IPIyyE.png) f_block4: ![](https://i.imgur.com/Z2Tf0Sy.png) ## flag1: shark{ascii_hexadecimal_base64_bigInterger} ## test code: ![](https://i.imgur.com/xiondMJ.png) # chall 2: ![](https://i.imgur.com/3KS9cu5.png) -> decode base64, hex 3 lần ![](https://i.imgur.com/dIRSNoS.png) ![](https://i.imgur.com/1CiQsvK.png) ![](https://i.imgur.com/dObykwk.png) ![](https://i.imgur.com/Xg0kybx.png) ![](https://i.imgur.com/1W4Zdyu.png) ![](https://i.imgur.com/xbviHAe.png) ## flag2: flag = shark {H3110_MY_Fr13ND} ## test code: ![](https://i.imgur.com/K09NN9V.png) # chall 3: ![](https://i.imgur.com/94xhih8.png) input: ``` def xor(a: bytes, b: bytes): return bytes([a[i%len(a)] ^ b[i%len(b)] for i in range(max(len(a), len(b)))]) flag = b"shark{????????????????????????????}" key = b"??????" output = b"\x10\x1a\x18\x02\x1f\x14\x1b\x1d\x0b/<\x0e<$\x18\x1e+,\x16\x0f" key = xor(flag, output) print(key) from pwn import xor key = bytes.fromhex('63727970746f') print(xor(output,key)) ``` output: ``` b'shark{xor_Ha_Van_Cu}' ``` ## flag3: flag = shark{xor_Ha_Van_Cu} ## test code: ![](https://i.imgur.com/xFYXEkn.png) # chall 4: ![](https://i.imgur.com/X0m3SPR.png) -> số xui xẻo, không may mắn thường là số 13. ![](https://i.imgur.com/oh1GjoC.png) ![](https://i.imgur.com/FH9xVLs.png) ## flag4: flag = shark{let_me_down_slowly} ## test code: ![](https://i.imgur.com/uvK2nJU.png) # chall 5: ![](https://i.imgur.com/vvgX5h5.png) -> lag = xor(key1,key2) input: ``` key3 = b'7\xdc\xb2\x92\x03\x0f\xaa\x90\xd0~\xec\x17\xe3\xb1\xc6\xd8\xda\xf9L5\xd4\xc9\x19\x1a^\x1e' key4 = b'\x91\x14\x04\xe1?\x94\x88N\xab\xbe\xc9%\x85\x12@\xa5/\xa3\x81\xdd\xb7\x97\x00\xddm\r' key5 = b'\x04\xee\x98U \x8a,\xd5\x90\x91\xd0Gg\xaeG\x961p\xd1f\r\xf7\xf5o_\xaf' key6 = b'\xd1NOTwjzy\x8a?\xaa\x14oe\x9e\x85\xacKh\xd1\x18\xc0\x89\xdc3\xd8\xc7VqRnpgT\x9a$\x94\x08' from pwn import xor key1 = xor(key3,key4) key2 = xor(key5,key6) print(xor(key1,key2)) ``` output: ``` b'shark{tran_anh_nhat_viet_dep_trai_qua}' ``` ## flag5: flag = shark{tran_anh_nhat_viet_dep_trai_qua} ## test code: ![](https://i.imgur.com/1ESmeEa.png) # chall 6: ![](https://i.imgur.com/nEDJC9j.png) ![](https://i.imgur.com/wAo9hj0.png) ## flag6: flag = shark{B4BY_5H4rK_D00_D00_D00_D00} ## test code: ![](https://i.imgur.com/ppI8pMX.png) # chall 7: ![](https://i.imgur.com/90jR2Ao.png) Br41LL3 alphabet -> braille alphabet ![](https://i.imgur.com/a16zNGU.png) ## flag7: flag = shark{t00_bl1nd_t0_s33} ## test code: ![](https://i.imgur.com/T04wXjO.png)