From 6d4c704287a636eae0723c4aad5582751092eab0 Mon Sep 17 00:00:00 2001 From: CodFrm Date: Sat, 27 Apr 2019 23:31:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=96=87=E6=A1=A3&=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E8=80=83=E8=AF=95=E5=A1=AB=E7=A9=BA=E7=AD=94=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 9 +++++---- docs/1-UserGuide/1-2-firefox.md | 3 ++- docs/1-UserGuide/README.md | 4 ---- docs/README.md | 1 + src/config.js | 4 ++-- src/cxmooc-tools/chaoxing/exam.js | 7 +++---- src/server/listen.js | 1 + src/tampermonkey/cxmooc.js | 6 ++++-- 8 files changed, 18 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index e527271c..4d4a5e2b 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/codfrm/cxmooc-tools.svg?label=version) ## 关于超星慕课小工具 -一个超星慕课刷课工具,火狐,谷歌,油猴支持.全自动任务,视频倍速秒过,作业题库,验证码自动打码(੧ᐛ੭挂科模式,启动) +一个超星慕课刷课工具,火狐,谷歌,油猴支持.全自动任务,视频倍速秒过,作业考试题库,验证码自动打码(੧ᐛ੭挂科模式,启动) ### 浏览器适配列表 * [x] Chrome for PC @@ -18,10 +18,11 @@ * [x] 视频秒过 * [x] 视频倍速 * [x] 静音播放 -* [x] 自动答题 +* [x] 任务答题 * [x] 自动阅读 * [x] 自动填写验证码 -* [ ] 考试答题 +* [x] 考试答题 +* [ ] 作业答题 ## 参与开发 > 如果你想参与开发,请阅读下面内容,如果只是使用本插件,请移步 **[使用文档](https://cx-doc.xloli.top/)** @@ -62,12 +63,12 @@ npm run server ## 题库 1. 题库大部分答案来源于用户答题后的页面采集,**所以需要有人第一次做过**,后来的人才能搜索到题目。 2. 可以配置随机题目,当题库中没有的题目则会自动随机选择一个选项 +3. 考试题库收集,需要考试完毕后,进入考试答案页面,插件会自动收集. 题库记录提示: ![](/dist/images/3.webp) - ## 关于反馈 您可以通过Issues反馈,反馈时请尽量提供足够明确的信息。 diff --git a/docs/1-UserGuide/1-2-firefox.md b/docs/1-UserGuide/1-2-firefox.md index 534ae0c6..f432887f 100644 --- a/docs/1-UserGuide/1-2-firefox.md +++ b/docs/1-UserGuide/1-2-firefox.md @@ -10,4 +10,5 @@ title: FireFox插件 如果火狐出现题库错误等问题,请访问一次这个网址:[https://blog.icodef.com:8081/](https://blog.icodef.com:8081/),允许访问通过 ## 火狐手机版(Android) -> 待完善 \ No newline at end of file +> 待完善,可以下载app后在商店安装,但是功能并不保证稳定(超星手机浏览器无法完成视频任务点) + diff --git a/docs/1-UserGuide/README.md b/docs/1-UserGuide/README.md index 01f6f7a5..c1e7a124 100644 --- a/docs/1-UserGuide/README.md +++ b/docs/1-UserGuide/README.md @@ -8,10 +8,6 @@ title: 使用教程 或者使用已经打包好了的浏览器版本使用:[打包版浏览器](/1-UserGuide/1-1-chrome.html#%E6%8B%96%E6%8B%BD%E5%AE%89%E8%A3%85crx%E6%A8%A1%E5%BC%8F) -本扩展还支持手机刷课,[火狐手机版(Android)](/1-UserGuide/1-2-firefox.html#%E7%81%AB%E7%8B%90%E6%89%8B%E6%9C%BA%E7%89%88-android) - -也可以使用yandex浏览器手机刷课(文档待完善) - 最近也发布了一个智慧树的版本,油猴脚本:[https://greasyfork.org/zh-CN/scripts/382037-%E6%99%BA%E6%85%A7%E6%A0%91%E5%B0%8F%E5%B7%A5%E5%85%B7](https://greasyfork.org/zh-CN/scripts/382037-%E6%99%BA%E6%85%A7%E6%A0%91%E5%B0%8F%E5%B7%A5%E5%85%B7),插件是全部整合的 [telegram群](https://t.me/joinchat/MHU8Gg2fP3Q51HLY2wqmQA) [QQ群](https://shang.qq.com/wpa/qunwpa?idkey=9bddd2564d84bd999940de422d1c0c70f87ecaf02fe9d7c60389fc2b376179eb) diff --git a/docs/README.md b/docs/README.md index 478670c3..c845d979 100644 --- a/docs/README.md +++ b/docs/README.md @@ -41,4 +41,5 @@ footer: MIT Licensed | Copyright © 2018 CXmooc-tool developer Team * 自动答题 * 自动阅读 * 自动填写验证码 +* 考试答题 diff --git a/src/config.js b/src/config.js index 0cb63f82..6904d8da 100644 --- a/src/config.js +++ b/src/config.js @@ -1,6 +1,6 @@ module.exports = { url: "https://cx.icodef.com/", - version: 2.09, + version: 2.08, update: 'https://github.com/CodFrm/cxmooc-tools/releases', enforce: false, cx: { @@ -9,7 +9,7 @@ module.exports = { }, injection: '', hotversion: { - v2_08: 2.082, + v2_08: 2.083, v2_07: 2.071, v2_06: 2.06, }, diff --git a/src/cxmooc-tools/chaoxing/exam.js b/src/cxmooc-tools/chaoxing/exam.js index 0498ae1f..d121f102 100644 --- a/src/cxmooc-tools/chaoxing/exam.js +++ b/src/cxmooc-tools/chaoxing/exam.js @@ -93,13 +93,12 @@ module.exports = { for (let n = 0; n < correct.length; n++) { if (correct[n].option == pos) { notic += ' 第' + pos + '空:' + correct[n].content + '
'; - let ifDoc = $(options[i]).find('iframe'); - if (ifDoc.length <= 0) { + var uedit = $(options[n]).find('textarea'); + if (uedit.length <= 0) { this.notic.text('答案搜索错误'); return false; } - ifDoc = ifDoc[0].contentDocument; - $(ifDoc.body).html('

' + correct[n].content + '

'); + UE.getEditor(uedit.attr('name')).setContent(correct[n].content); break; } } diff --git a/src/server/listen.js b/src/server/listen.js index 05f06b52..87120697 100644 --- a/src/server/listen.js +++ b/src/server/listen.js @@ -36,6 +36,7 @@ if (serverConfig.env == 'prod') { var vcode = new vcodePack(); } +app.set('trust proxy', 'loopback, 127.0.0.1/8'); var mooc = new moocModel(); var redis = new redisCli(); app.use(bodyParser.json()); diff --git a/src/tampermonkey/cxmooc.js b/src/tampermonkey/cxmooc.js index 06e7040b..8dd25cd1 100644 --- a/src/tampermonkey/cxmooc.js +++ b/src/tampermonkey/cxmooc.js @@ -1,13 +1,15 @@ // ==UserScript== // @name 超星慕课小工具 // @namespace https://github.com/CodFrm/cxmooc-tools -// @version 2.0.7 -// @description 一个超星慕课刷课工具,火狐,谷歌,油猴支持.全自动任务,视频倍速秒过,作业题库,验证码自动打码(੧ᐛ੭挂科模式,启动) +// @version 2.0.8 +// @description 一个超星慕课刷课工具,火狐,谷歌,油猴支持.全自动任务,视频倍速秒过,作业考试题库,验证码自动打码(੧ᐛ੭挂科模式,启动) // @author CodFrm // @match *://*/mycourse/studentstudy?* // @match *://*/ztnodedetailcontroller/visitnodedetail?* // @match *://*/antispiderShowVerify.ac* // @match *://*/html/processVerify.ac?* +// @match *://*/exam/test/reVersionPaperMarkContentNew?* +// @match *://*/exam/test/reVersionTestStartNew?* // @grant GM_xmlhttpRequest // @license MIT // ==/UserScript==