proof_of_work() print('Successfully pass the pow!') iv,cbc,qwq=read_data() mid = [] print('Successfully read the data!') #print('iv =',iv) #print('cbc =',cbc) #print(cbc.hex()[64:])
r.recvuntil('> ')
iv = bytearray.fromhex(qwq)[16:32] print(iv) new_iv = bytearray(b'\x00'*16) count = 1 for i in range(16): for j in range(256): new_iv[15-i] = j r.sendline('1') r.recvuntil('(in hex): ') r.sendline(str(new_iv.hex())) r.recvuntil('(in hex): ') r.sendline(str(cbc.hex()[64:96])) back = r.recvline(keepends = False) r.recvuntil('> ') if(b'success' in back): print(back,j) ans = j ^ count break count += 1 mid.append(ans) for m in range(15-i,16): new_iv[m] = count ^ mid[15-m] find = '' for i in range(16): find += hex(iv[i] ^ mid[15 - i])[2:].rjust(2,'0') flag = bytearray.fromhex(find)