标签:find ssi decode int content lib session res for
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‘))
标签:find ssi decode int content lib session res for
原文地址:https://www.cnblogs.com/DennyT/p/11331242.html