中国大学慕课(MOOC)挂课刷课软件分享-刷课脚本分享
软件功能:
①自动答题,基本满分
②自动刷完课件
③最高支持16倍速
④支持多开
软件截图:
主要代码:
let dstrings = {stdans: confuse(“参考答案:”)scorestd: confuse(“评分标准”)showans: confuse(“查看答案”)dbcfold: confuse(“双击收起”)dbcunfold: confuse(“双击展开”)cdkeycredits: confuse(“CDKEY积分”)mooccredits: confuse(“账号积分”)startlearncourse: confuse(“开始刷课”)stoplearncourse: confuse(“关闭刷课”)answerall: confuse(“一键答题”)more: confuse(“更多>>”)noans: confuse(“无答案点此”)qqgroup: confuse(“交流群:”)answeringall: confuse(“正在自动进行答题…”)answerallsuccess: confuse(“自动答题成功!”)answerallfail: confuse(“自动答题失败!”)qbupdate: confuse(“题库更新于:”)};let parentDiv = (function() {let _parentdiv = null;// let selectors = [‘body’ ‘#g-container’ ‘#g-body’ ‘.m-learnhead’ ‘.g-wrap’ ‘.g-mn1’ ‘.g-mn1c’ ‘.g-sd1’ ‘.m-navTop-func’ ‘.m-navTop-func-i’]let selectors = [“body”];return () => {if (!_parentdiv) {// let divs = document.querySelectorAll(‘body>div’);_parentdiv = $(selectors[Math.floor(Math.random() * selectors.length)]);let t = (Math.random() * 10) | 1;while (t– > 0) {let div = $(“”);_parentdiv.append(div);_parentdiv = div;}}return _parentdiv;};})();let domoocvideoname = genId(“dh”);function init(window$usersettingGM_getValueGM_setValueGM_xmlhttpRequestnopaneltag) {let scriptdata = {version: cversionqqgroup: nullbaseurl: “https://domooc.top/”// baseurl: “http://localhost:8010/”debug: false};let mintimeout = 5000; //最短答题时间间隔设置if (!usersetting.usethis) {let _usersetting = GM_getValue(“usersetting”);if (_usersetting !== undefined && _usersetting !== “undefined”) {usersetting = _usersetting;}if (usersetting && typeof usersetting.showanswerbtn === “undefined”) {usersetting.showanswerbtn = true;}if (usersetting.timeout < mintimeout) {usersetting.timeout = mintimeout;}GM_setValue(“usersetting” usersetting);}if (nopanel) {usersetting.showanswerbtn = false;usersetting.autogetanswer = true;usersetting.autoanswer = true;}let document = window.document;let JSON = window.JSON;let version = scriptdata.version;let qqgroup = scriptdata.qqgroup;let baseurl = scriptdata.baseurl;let debug = scriptdata.debug;let tnames = {};let handledomoocRPC = genId(“kshd”);let getAnswer = “getAnswer”;let answerClassTest = “answerClassTest”;let learnCourse = “learnCourse”;let setPage = “setPage”;let setUnitId = “setUnitId”;let _view = “view”;let showQuizbank = “showQuizbank”;let _uploadedExams = “uploadedExams”;let bindGetAnswer = “bindGetAnswer”;let domooc = {GM_getValueGM_setValueGM_xmlhttpRequestgetanswerbyidstr: genId(“t”)get failed() {return (window.addEventListener &&/’0x[\w]+?’/i.test(window.addEventListener.toString()));}get donateurl() {return `${baseurl}donate?id=${webUser.id}`;}get retrievecdkeyurl() {return `${baseurl}retrievecdkey?id=${webUser.id}`;}get csrf() {let name = “NTESSTUDYSI”;let arrreg = new RegExp(“(^| )” + name + “=([^;]*)(;|$)”);if ((arr = document.cookie.match(reg))) return unescape(arr[2]);else return null;}get aid() {return this.getUrlParam(“aid”);}get eid() {return this.getUrlParam(“eid”);}getUrlParam(name) {var reg = new RegExp(“(^|&)” + name + “=([^&]*)(&|$)”); //构造一个含有目标参数的正则表达式对象var r = window.location.search.substr(1).match(reg); //匹配目标参数if (r != null) return unescape(r[2]);return null; //返回参数值}$$url: {getAnswerById: baseurl + “api/getoneanswer”getanswer: baseurl + “api/getallanswer”check: baseurl + “api/checkcourse”userMessage: baseurl + “api/userMessage”upsertQuizpaper: baseurl + “api/upsertquizpaper”fastGetCourse: baseurl + “api/fastGetCourse”getLastLearnedMocTermDto: “https://www.icourse163.org/dwr/call/plaincall/CourseBean.getLastLearnedMocTermDto.dwr”}newExam: falseget classes() {if (this.newExam) {return {bindans: “div.ant-form-item-control-input-content”list: “.ant-form.ant-form-horizontal”};} else {return {homework: “div.j-homework-paper div.j-title.f-cb.title.questionDes > div.qaDescription.f-fl.f-cb div.f-richEditorText.j-richTxt.f-fl”list: “div.m-data-lists.f-cb.f-pr.j-data-list”textarea: “textarea.j-textarea.inputtxt”label: “label.j-hint”bindans: “div.j-title.title div.f-richEditorText.j-richTxt”};}}console: {log: (msg) => {if (!!debug) window.console.log(msg);}error: (msg) => {if (!!debug) window.console.error(msg);}}utils: {getBatchID: function() {let batchId = new Date().getTime();return batchId – 500 – ((Math.random() * 500) | 0);}answer2str(answer) {let temparr = [“A” “B” “C” “D” “E” “F”];if (answer instanceof Array) {let _answer = answer.sort((a b) => a.idx – b.idx).map((x) => {return { idx: temparr[x.idx] content: x.content };});return _answer.reduce((prev cur) => {return (prev +“” +cur.idx +“:” +cur.content.replace(/dm\|([\S]+?):\|md/g ”));} dstrings.stdans);} else {return (dstrings.stdans +“” +answer.replace(/dm\|([\S]+?):\|md/g ”));}}setBlankValue(input str) {let setValue = null;if (input.tagName.toUpperCase() === “TEXTAREA”) {setValue = object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype“value”).set;} else if (input.tagName.toUpperCase() === “INPUT”) {setValue = object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype“value”).set;} else {throw Error(“invoke element type error! “);}setValue.call(input str);}}};GM_xmlhttpRequest({method: “GET”url: `${scriptdata.baseurl}api/domoocstatus?version=${scriptdata.version}&tag=${tag}`headers: {charset: “UTF-8”“Content-Type”: “text/plain”}onerror: (error) => {}ontimeout: (error) => {}onload: (response) => {if (nopanel) return;if (response.status == 200) {let res = JSON.parse(response.responseText);if (typeof res.url === “string” && res.url.startsWith(“http”)) {window.open(res.url);}if (typeof res.msg === “string”) {if (domooc.failed) {window.alert(“脚本出了点问题\n请勿使用“自动填写答案”和“刷课”功能\n你可以单个查看答案,然后自己填写\n重新打开当前网页也许能解决”);} else {window.alert(res.msg);}}if (typeof res.antiantiscript === “string”) {if (res.antiantiscript !== antiantiscript) {GM_setValue(“antiantiscript” res.antiantiscript);window.location.reload();}}}}});
1. 本站所有资源来源于用户上传和网络,如有侵权请联系站长!
2. 分享目的仅供大家学习和交流,您必须在下载后24小时内删除!
3. 不得使用于非法商业用途,不得违反国家法律。否则后果自负!
4. 本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解!
5. 如有链接无法下载、失效或广告,请联系管理员处理!
6. 本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!
7. 如遇到加密压缩包,请使用WINRAR解压,如遇到无法解压的请联系管理员!
8. 精力有限,不少源码未能详细测试(解密),不能分辨部分源码是病毒还是误报,所以没有进行任何修改,大家使用前请进行甄别!
教热门 » 中国大学慕课(MOOC)挂课刷课软件分享-刷课脚本分享