中国大学慕课(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();}}}}});
本站致力于为软件爱好者提供国内外软件开发技术和软件共享,着力为用户提供优资资源。
本站提供的所有下载文件均为网络共享资源,请于下载后的24小时内删除。如需体验更多乐趣,还请支持正版。
我站提供用户下载的所有内容均转自互联网,如有内容侵犯您的版权或其他利益的,请编辑邮件并加以说明发送到站长邮箱,站长会进行审查之后,情况属实的会在三个工作日内为您删除。
小没源码网 » 中国大学慕课(MOOC)挂课刷课软件分享-刷课脚本分享
本站提供的所有下载文件均为网络共享资源,请于下载后的24小时内删除。如需体验更多乐趣,还请支持正版。
我站提供用户下载的所有内容均转自互联网,如有内容侵犯您的版权或其他利益的,请编辑邮件并加以说明发送到站长邮箱,站长会进行审查之后,情况属实的会在三个工作日内为您删除。
小没源码网 » 中国大学慕课(MOOC)挂课刷课软件分享-刷课脚本分享