BUUCTF:[GWCTF2019]math

题目来源:https://buuoj.cn/challenges#[GWCTF2019]math

pwntools交互题

连接环境

计算150次

伪C代码

式子的运算不变,四个数字,依次进行* - +运算

from pwn import *

p=remote('node4.buuoj.cn','28596')
for i in range(0,150):
ou=p.recvuntil('problem: ')
print (ou)
a=int(p.recvuntil('*')[:-1])
b=int(p.recvuntil('-')[:-1])
c=int(p.recvuntil('+')[:-1])
d=int(p.recvuntil('=')[:-1])
p.sendline(str(a*b-c+d))
p.interactive()

flag{d00b86f9-c334-4837-b849-c6f39529243a}

posted @ 2022-07-01 21:36  B0mbax  阅读(107)  评论(0编辑  收藏  举报