No writeup, only solution(because will just take up too much space, and solution way is same as the previous tasks)))Have some written solution but it's on C(or python)```pythonimport socketfrom Crypto.Hash import SHAfrom Crypto import Randomfrom Crypto.PublicKey import RSAfrom Crypto.Cipher import PKCS1_v1_5key=RSA.import_key(open("private.der","rb").read())cipher = PKCS1_v1_5.new(key)
sock=socket.socket()sock.connect(("trustctf.disasm.me",1234))sock.send(b"Hello\n")assert(sock.recv(6)==b"Hello\n")data = sock.recv(128)dsize = SHA.digest_sizesentinel = Random.new().read(15+dsize)message = cipher.decrypt(data, sentinel)id = message.decode()data = cipher.encrypt(b"Hello\n")sock.send(data)assert(sock.recv(128)==data)flag=(sock.recv(128)).decode()print(flag % id)```
[Solution written on C](https://github.com/Vairelt/unictf2020/tree/master/Client%20Handler/solve)