100米你能跑多快? 预备,跑!
解题链接: http://ctf5.shiyanbar.com/jia
import urllib.request
import re
import requests
url = "http://ctf5.shiyanbar.com/jia"
request = requests.session()
response = request.get(url)
a = ((response.content).decode('gbk'))
item = re.findall(r"<form .*?>(.*?)<div .*?>(.*?)</div>(.*?)</form>",a,re.S|re.M)
for b in item:
c = b[1]
print(c[1])
c = re.findall(r"[0-9]+.*?",c)
c = list(map(int,c))
d = (c[0]+c[1])*(c[2]-c[3])-(c[4]+c[5]-c[6])*c[7]
print(d)
data = {"pass_key":d}
response = request.post(url,data)
print((response.content).decode('gbk'))