实验室安全测验系统主动答题脚本-无锡学院、南京信息工程大学 ...

打印 上一主题 下一主题

主题 859|帖子 859|积分 2577

实验室安全测验系统主动答题脚本-无锡学院、南京信息工程大学

   此脚本支持但不限于南京信息工程大学、西北农林科技大学、广东海洋大学、曲阜师范大学、唐山工业职业技能学院、台州学院、福建农业职业技能学院、郑州航空工业管理学院、无锡学院、嘉兴学院、中山大学、扬州大学广陵学院、宁夏大学、河北科技大学、仲恺农业工程学院、江苏海洋大学、淮阴工学院、湖南文理学院、南通职业大学、暨南大学、青岛大学、玉林师范学院、中国农业大学、华侨大学、燕山大学、东北大学、湖南师范大学、西安建筑科技大学、河北科技大学
  




  • 安装油猴插件
    推荐利用火狐浏览器
    https://www.tampermonkey.net/

  • 添加脚本


  1. // ==UserScript==
  2. // @name         实验室安全
  3. // @namespace    myetyet
  4. // @version      4.4.2
  5. // @description  实验室安全网上考试答案自动填充,支持单位:南京信息工程大学、西北农林科技大学、广东海洋大学、曲阜师范大学、唐山工业职业技术学院、台州学院、福建农业职业技术学院、郑州航空工业管理学院、无锡学院、嘉兴学院、中山大学、扬州大学广陵学院、宁夏大学、河北科技大学、仲恺农业工程学院、江苏海洋大学、淮阴工学院、湖南文理学院、南通职业大学、暨南大学、青岛大学、玉林师范学院、中国农业大学、华侨大学、燕山大学、东北大学、湖南师范大学、西安建筑科技大学、河北科技大学
  6. // @author       myetyet
  7. // @match        http://examsafety.nuist.edu.cn/redir.php?catalog_id=6&cmd=dati
  8. // @match        https://labsafe.nwafu.edu.cn/redir.php?catalog_id=6&cmd=dati
  9. // @match        http://210.38.136.71:8090/redir.php?catalog_id=6&cmd=dati
  10. // @match        http://webvpn.cwxu.edu.cn/http-80/77726476706e69737468656265737421e3ee529d363b7b1e7d1f91b9d65027209705bc/redir.php?catalog_id=6&cmd=dati&moni=
  11. // @match        http://aqjy.qfnu.edu.cn/redir.php?catalog_id=6&cmd=dati
  12. // @match        http://aqks.tsgzy.edu.cn/redir.php?catalog_id=6&cmd=dati&moni=
  13. // @match        https://sys.tzc.edu.cn/labexam/redir.php?catalog_id=6&cmd=dati&moni=
  14. // @match        http://192.168.61.191/redir.php?catalog_id=6&cmd=dati&moni=
  15. // @match        http://sxxt.fjny.com:11200/redir.php?catalog_id=6&cmd=dati&moni=
  16. // @match        http://10.66.100.207/aqzrui/model/TwoGradePage/joinexam.aspx?kind=4&setid=*
  17. // @match        http://10.1.80.140/redir.php?catalog_id=6&cmd=dati&moni=
  18. // @match        http://10.110.73.8/redir.php?catalog_id=6&cmd=dati
  19. // @match        http://202.116.65.193/redir.php?catalog_id=6&cmd=dati
  20. // @match        http://58.192.130.29/redir.php?catalog_id=6&cmd=dati
  21. // @match        https://sysaq.nxu.edu.cn/labexam/redir.php?catalog_id=6&cmd=dati&moni=
  22. // @match        http://202.206.64.193/redir.php?catalog_id=6&cmd=dati&moni=*
  23. // @match        http://192.168.2.51/redir.php?catalog_id=6&cmd=dati*
  24. // @match        http://labexam.jou.edu.cn/redir.php?catalog_id=6&cmd=dati
  25. // @match        http://172.16.5.224/redir.php?catalog_id=6&cmd=dati&moni=0
  26. // @match        http://172.26.0.150/aqzrui/model/TwoGradePage/joinexam.aspx?kind=4&setid=*
  27. // @match        https://yaltest.ntvu.edu.cn/http/webvpn6c6162736166652e6e7476752e6564752e636e/redir.php?catalog_id=6&cmd=dati*
  28. // @match        https://aqpx.jnu.edu.cn/redir.php?catalog_id=6&cmd=dati&moni=*
  29. // @match        https://webvpn.qdu.edu.cn/http-80/*/redir.php?catalog_id=6&cmd=dati&mode=test
  30. // @match        https://webvpn.cwxu.edu.cn/http-80/77726476706e69737468656265737421e3ee529d363b7b1e7d1f91b9d65027209705bc/redir.php?catalog_id=6&cmd=dati&moni=
  31. // @match        http://210.36.241.11/redir.php?catalog_id=6&cmd=dati&moni=0
  32. // @match        http://aqks.cau.edu.cn/redir.php?catalog_id=6&cmd=dati&moni=
  33. // @match        http://labsafety-hqu-edu-cn.w.hqu.edu.cn:8118/redir.php?catalog_id=6&cmd=dati*
  34. // @match        http://202.206.247.8/redir.php?catalog_id=6&cmd=dati&moni=
  35. // @match        http://aqks.neu.edu.cn/redir.php?catalog_id=6&cmd=dati&mode=*
  36. // @match        https://labexam.hunnu.edu.cn/labexam/redir.php?catalog_id=6&cmd=dati&moni=
  37. // @match        https://labexam.xauat.edu.cn/redir.php?catalog_id=6&cmd=dati*
  38. // @match        http://sysaqksxt.hebust.edu.cn/redir.php?catalog_id=6&cmd=dati&moni=0
  39. // @require      https://greasyfork.org/scripts/391129-nuist-examsafety-question-bank/code/NUIST%20examsafety%20Question%20Bank.js?version=996976
  40. // @run-at       document-end
  41. // @grant        none
  42. // @compatible   chrome
  43. // @license      GPL-3.0-only
  44. // ==/UserScript==
  45. (function() {
  46.     'use strict';
  47.     var host = window.location.host;
  48.     if (host != "10.66.100.207" && host != "172.26.0.150") {
  49.         var questions = document.getElementsByClassName("shiti");
  50.         var _question, question, index, answer;
  51.         var notfounds = new Array(), dislocations = new Array();
  52.         var notfound = 0, dislocation = 0;
  53.         for (let i = 0, __qlength__ = questions.length; i < __qlength__; ++i) {
  54.             _question = questions[i].children[0].textContent.split("\u3001");
  55.             index = _question.shift();
  56.             question = _question.join("\u3001").replace(/[^0-9A-Za-z\u4e00-\u9fff]/g, "").replace(/^(\u5224\u65ad|\u5355\u9009|\u591a\u9009)\u9898/, "");
  57.             answer = findAnswer(question);
  58.             var _text, _c, c, answers;
  59.             var answered = false;
  60.             if (answer != "") {
  61.                 answers = answer.split("\u000a");
  62.                 for (let choice = 0, __clength__ = questions[i].children[1].childElementCount; choice < __clength__; ++choice) {
  63.                     var ipt = document.getElementById("ti_" + index + "_" + String(choice));
  64.                     _text = ipt.parentNode.children[1].textContent.replace(/[\s\?]/g, "");
  65.                     if (_text.length == 0) {
  66.                         dislocations[dislocation++] = String(index);
  67.                         questions[i].children[0].setAttribute("style", "color: red");
  68.                     } else {
  69.                         _c = _text.replace(/\./, "\u3001").replace(/\uff0e/, "\u3001").split("\u3001");
  70.                         if (_c.length > 1) {
  71.                             _c.shift();
  72.                         }
  73.                         c = _c.join("\u3001");
  74.                         c = c.replace("\u6b63\u786e", "\u5bf9").replace("\u9519\u8bef", "\u9519");
  75.                         for (let ai = 0, __alength__ = answers.length; ai < __alength__; ++ai) {
  76.                             if (answers[ai] == c) {
  77.                                 ipt.click();
  78.                                 answered = true;
  79.                                 break;
  80.                             }
  81.                         }
  82.                     }
  83.                 }
  84.                 if (!answered) {
  85.                     notfounds[notfound++] = String(index);
  86.                     questions[i].children[0].setAttribute("style", "color: red");
  87.                 }
  88.             } else {
  89.                 notfounds[notfound++] = String(index);
  90.                 questions[i].children[0].setAttribute("style", "color: red");
  91.             }
  92.         }
  93.         if (notfound > 0 || dislocation > 0) {
  94.             if (notfound > 0) {
  95.                 alert("\u6b64\u9875\u9762\u5171\u6709" + String(notfound) + "\u9053\u9898\u672a\u80fd\u81ea\u52a8\u586b\u5145\uff1a" + notfounds.join("\u3001"));
  96.             }
  97.             if (dislocation > 0) {
  98.                 alert("\u6b64\u9875\u9762\u5171\u6709" + String(dislocation) + "\u9053\u9898\u7531\u4e8e\u9009\u9879\u9519\u4f4d\uff0c\u5df2\u9009\u62e9\u6b63\u786e\u4f46\u4e0d\u5f97\u5206\u9009\u9879\uff1a" + dislocations.join("\u3001"));
  99.             }
  100.         } else {
  101.             var next = document.getElementsByClassName("nav")[0].children[0];
  102.             if (next && next.value == "\u4e0b\u4e00\u9875") {
  103.                 next.click();
  104.             } else {
  105.                 document.getElementsByClassName("nav")[0].children[1].click();
  106.             }
  107.         }
  108.     } else {
  109.         let Qs = new Array();
  110.         let __QsLen__ = 0;
  111.         if (document.getElementById("DataGridA")) {
  112.             for (let i = 0, __Q__ = document.getElementById("DataGridA").children[0], __QLen__ = __Q__.childElementCount; i < __QLen__; ++i) {
  113.                 Qs[__QsLen__++] = __Q__.children[i];
  114.             }
  115.         }
  116.         if (document.getElementById("DataGridB")) {
  117.             for (let i = 0, __Q__ = document.getElementById("DataGridB").children[0], __QLen__ = __Q__.childElementCount; i < __QLen__; ++i) {
  118.                 Qs[__QsLen__++] = __Q__.children[i];
  119.             }
  120.         }
  121.         if (document.getElementById("DataGridC")) {
  122.             for (let i = 0, __Q__ = document.getElementById("DataGridC").children[0], __QLen__ = __Q__.childElementCount; i < __QLen__; ++i) {
  123.                 Qs[__QsLen__++] = __Q__.children[i];
  124.             }
  125.         }
  126.         let notfounds = new Array();
  127.         let notfound = 0;
  128.         for (let i = 0; i < __QsLen__; ++i) {
  129.             let t = Qs[i].children[0].children[0].children[0];
  130.             let _Q = t.children[0].children[0].children[0].textContent.split("\u3001");
  131.             let index = _Q.shift();
  132.             let Q = _Q.join("\u3001").replace(/[^0-9A-Za-z\u4e00-\u9fff]/g, "");
  133.             let A = findAnswer(Q);
  134.             let As = A.split("\u000a");
  135.             let Cs = t.children[1].children[0].children[0].children[0].children[0];
  136.             let answered = false;
  137.             for (let j = 0, __CsLen__ = Cs.childElementCount; j < __CsLen__; ++j) {
  138.                 let _C = Cs.children[j].children[1].textContent.replace(/\./, "\u3001").replace(/\uff0e/, "\u3001").split("\u3001");
  139.                 if (_C.length > 1) {
  140.                     _C.shift();
  141.                 }
  142.                 let C = _C.join("\u3001");
  143.                 C = C.replace("\u6b63\u786e", "\u5bf9").replace("\u9519\u8bef", "\u9519");
  144.                 for (let k = 0, __AsLen__ = As.length; k < __AsLen__; ++k) {
  145.                     if (C == As[k]) {
  146.                         Cs.children[j].children[0].click();
  147.                         answered = true;
  148.                         break;
  149.                     }
  150.                 }
  151.             }
  152.             if (!answered) {
  153.                 notfounds[notfound++] = String(index);
  154.                 t.children[0].children[0].children[0].setAttribute("style", "color: red");
  155.             }
  156.         }
  157.         if (notfound > 0) {
  158.             alert("\u6b64\u9875\u9762\u5171\u6709" + String(notfound) + "\u9053\u9898\u672a\u80fd\u81ea\u52a8\u586b\u5145\uff1a" + notfounds.join("\u3001"));
  159.         }
  160.     }
  161. })();
复制代码


  • 现在已经添加了大多数学校,假如有学校利用雷同的实验室安全测验框架,可以在脚本中继续添加
   格式如下:http://192.168.61.191/redir.php?catalog_id=6&cmd=dati&moni=
http://测验ip地址/redir.php?catalog_id=6&cmd=dati&moni=
  



  • 假如必要快速登录下一个账号,可以选择删除cookies


  • 更多脚本:https://greasyfork.org/zh-CN

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复

使用道具 举报

0 个回复

倒序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

曂沅仴駦

金牌会员
这个人很懒什么都没写!

标签云

快速回复 返回顶部 返回列表