すのはら荘春原庄的雪

【MoeCTF2024】PWN

Toretto·2024-10-15 21:04·38 次阅读

【MoeCTF2024】PWN

1.NotEnoughTime#

这道题我发现存在网络问题可能会导致出现问题,建议关闭代理。
第二个就是要注意每个算式返回整数

点击查看代码
Copy
from pwn import * import math context.log_level='debug' p = remote('127.0.0.1',19111) p.recvuntil("Test start, you have only 30 seconds.\nLet's begin with simple ones.\n") title = p.recvuntil('=').strip().decode()[:-1] result = eval(title) p.sendline(str(result)) title = p.recvuntil('=').strip().decode()[:-1] result = math.floor(eval(title)) p.sendline(str(result)) p.recvuntil('OK, then some tough ones. Be WELL PREPARED!\n') for i in range(100): title = p.recvuntil('=').strip().decode()[:-1] title = title.replace("\n","").replace(" ","").replace(" ","") print(title) result = math.floor(eval(title)) print(result) p.sendline(str(result))
posted @   vstral  阅读(38)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
点击右上角即可分享
微信分享提示
目录