大家好,我又来了,昨天发了普法的脚本之后,有几个朋友私信我想找这个青椒第二课堂禁毒知识的脚本,就晚上没事简单看了看
这个脚本跟普法的原理是一样的,用一套做满分的payload重复提交。
下面python代码自取。
几个说明:
1、cookie获取:浏览器进www.2-class.com 开F12开发者工具,登录后随便刷新下网页,找个请求,复制里面请求Header里的cookie内容。是类似于aliyungf_tc=b*******cb6902f3f90635557533a17c27047; acw_tc=2f*****837535aa37366a7fb8b1c7; sid=aeb******887f0075
这样的字符串
2、reqtoken获取:接第一步,开发者工具里点Console(控制台),输入window.__DATA__.reqtoken,然后复制引号内的内容
3、在脚本里填入以上内容,完毕
然后执行一下就可以了。。
注意:52pojie和本站发布的均为同一作者zjh4473
# -*- coding: utf-8 -*- import requests import json import time import random # 获取reqtoken的命令: window.__DATA__.reqtoken cookie = '' reqtoken = '' def yi_jian_man_fen(): url = 'https://www.2-class.com/api/quiz/commit' headers = { 'Cookie': cookie, 'Content-Type': 'application/json', 'User-Agent': 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; en-us) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50' } time = random.randint(100, 350) data = { "list": [ { "questionId": 2986, "questionContent": "B" }, { "questionId": 2989, "questionContent": "C" }, { "questionId": 2990, "questionContent": "D" }, { "questionId": 2959, "questionContent": "C" }, { "questionId": 2928, "questionContent": "C" }, { "questionId": 2960, "questionContent": "A" }, { "questionId": 2961, "questionContent": "C" }, { "questionId": 2897, "questionContent": "B" }, { "questionId": 2930, "questionContent": "D" }, { "questionId": 2898, "questionContent": "B" }, { "questionId": 2963, "questionContent": "A" }, { "questionId": 2932, "questionContent": "D" }, { "questionId": 2901, "questionContent": "A" }, { "questionId": 2966, "questionContent": "D" }, { "questionId": 2934, "questionContent": "C" }, { "questionId": 2904, "questionContent": "D" }, { "questionId": 2907, "questionContent": "D" }, { "questionId": 2972, "questionContent": "C" }, { "questionId": 2973, "questionContent": "A" }, { "questionId": 2912, "questionContent": "B" } ], "time": time, "reqtoken": reqtoken } result = requests.post(url=url, data=json.dumps(data), headers=headers, verify=False) print(result.text) if __name__ == '__main__': yi_jian_man_fen()
发表回复