moctf-火眼金睛

emmm
----直接代码----
爬虫爬下数据后直接计算然后提交

# coding:utf-8 #
import requests
from bs4 import BeautifulSoup
url = "http://119.23.73.3:5001/web10/"
s = requests.session()
response = s.get(url)
content = BeautifulSoup(response.text , 'lxml')
str = content.select('textarea')[0].text
con  = "moctf"
count = str.count(con)

url2 = "http://119.23.73.3:5001/web10/work.php"
data = {"answer":count}
flag = s.post(url2 , data=data).text
print(flag)

你可能感兴趣的:(ctf)