1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| from pwn import* from LibcSearcher import * #p=remote("node4.buuoj.cn",) p=process("./babyheap") context.log_level="debug" libc=ELF('libc.so') elf=ELF('babyheap')
p.recvuntil('captcha is: ') cap=p.recv(8) p.sendlineafter('the captcha: ',cap) #p.sendlineafter( #p.sendlineafter('Please Select: ',)
def add(index,size): p.sendlineafter('Please Select: ','1') p.sendlineafter('Index: ',str(index)) p.sendlineafter('Size: ',str(size)) def fill(size,content): p.sendlineafter('Please Select: ','3') p.sendlineafter('Size: ',str(size)) p.sendlineafter('Content: ',content)
gdb.attach(p) sleep(1) add(20,0x60)
p.interactive()
|
评论区
欢迎你留下宝贵的意见,昵称输入QQ号会显示QQ头像哦~