Bugku 秋名山车神

秋名山车神

进入题目

image.png

那么长一串加减乘除还要2s内算出,大脑down机

那么上脚本~

#!/bin/python3                 
# -*- coding:utf-8 -*-         
import requests                
import re                      
                               
request = requests.Session()   
url = "http://114.67.175.224:12177/"   
response = request.get(url)    
n = re.findall("<div>(.*)=/?", response.text)
num = eval(n[0])               
print(num)                       

image.png

得到结果,但是post的键是什么呢??

直接发送body是会报错的

image.png

一筹莫展。。。。

我多刷新了几次之后看到它的页面内容变了

image.png

Give me vaule post about

给我vaule post

会不会键就是value? 尝试一下,试试又不要钱

image.png

#!/bin/python3                            
# -*- coding:utf-8 -*-                    
import requests                           
import re                                 
                                          
request = requests.Session()              
url = "http://114.67.175.224:12177/"      
response = request.get(url)               
n = re.findall("<div>(.*?)=", response.text)[0] 
num = eval(n)                             
data = {"value": num}                     
response1 = request.post(url, data=data)  
f = re.findall('flag{(.*?)}', response1.text)
flag = "flag{" + f[0] +"}"                   
print(flag)                               

得到flag