吾爱破解 - LCG - LSG |安卓破解|病毒分析|www.52pojie.cn

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 13306|回复: 23
收起左侧

[其他转载] 分享自用职教云自动选题、答题并自动修改答题已用时间 脚本

   关闭 [复制链接]
张晨曦 发表于 2020-11-1 22:11

笔者因某些原因,开发了此脚本,由于时间仓促,代码写的不尽人意,截止本文发出前仍可以使用。
如有需要,请自行修改源码对接你相应的题库接口就可以了
2020-11-1日,仅供学习交流,不得用于其他用途

// ==UserScript==
// home.php?mod=space&uid=170990         职教云自动答题
// home.php?mod=space&uid=467642    http://tampermonkey.net/
// home.php?mod=space&uid=1248337      1.0
// @description  职教云 自动答题
// home.php?mod=space&uid=686208       Zhang Chenxi
// home.php?mod=space&uid=195849        https://zjy2.icve.com.cn/*
// @require      http://libs.baidu.com/jquery/2.0.0/jquery.min.js
// home.php?mod=space&uid=609072        GM_xmlhttpRequest
// @grant        GM_download
// ==/UserScript==
 var result = "";
(function() {
  $(function(){
      function init_word(){
        var quesion_list = $(".e-q-q");
        var question_number = quesion_list.length;
        for(var i=0;i<question_number;i++){
            runAsync("q="+quesion_list[i].innerText,i);
        }
        var x = 15*question_number;//最长提交时间,单位s
        var y = 8*question_number;// 最短提交时间,单位s
        var rand = parseInt(Math.random() * (x - y + 1) + y);
        $("input[name='useTime']").val(rand);
        $("input[name='UseTime']").val(rand);
          $(".e-quest-header").append("<br><div style='color:red'>本次提交时间约为:"+ Math.round(rand/60)+"分"+(rand%60)+"秒<div>");
         // $(".e-quest-header").append("<br>—总之岁月漫长,然而值得等待—");
      }
      window.setTimeout( init_word, 2000 );
  });
  })();
  function get_option(true_answer,question_id){
    var option_list = $(".e-a-g ul")[question_id];
    var option_length = $(option_list).children().length;
    for(var i=0;i<option_length;i++){
      var answert_1 = $($(option_list).children()[i]).children(".ErichText.destroyTitleButton")[0].innerText;
      if(answert_1 == true_answer){
        $(option_list).children()[i].click();
        break;
      }else{
        if(i==option_length-1){
        var max = option_length-1;//最长提交时间,单位s
        var min = 0;// 最短提交时间,单位s
        var rand = parseInt(Math.random() * (max - min + 1) + min);
         $(option_list).children()[rand].click();
         var c = ["A","B","C","D"];
         console.log("第"+(question_id+1)+"题未找到答案,系统随机选择"+c[rand] );
        }
      }
    }
  }
  function runAsync(data_ry,question_id){
      GM_xmlhttpRequest({
          method: "POST",
          url: "",//接口
          data:data_ry,
          headers: {
              "Content-Type": "application/x-www-form-urlencoded;charset=utf-8"
          },
          onload: function(response) {
              get_option(response.responseText.trim(),question_id);
          }
      });
  }

使用效果:


QQ截图20201101220849.png

发帖前要善用论坛搜索功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。

 楼主| 张晨曦 发表于 2020-12-22 18:05
回复一下~
1、我给的是答题脚本,但因为题目的五花八门,我无法给查题接口,需要自己对接。
2、使用油猴脚本添加新脚本就可以了。但一定注意第一点,不然当然没有效果了...
无名先森。 发表于 2020-11-2 09:33
张晨曦 发表于 2020-11-1 22:51
头部加上,吾爱编辑器没显示出来
// ==UserScript==// @name         职教云自动答题// @namespace    h ...

好像不是这个问题, QQ截图20201102093217.png
 楼主| 张晨曦 发表于 2020-11-1 22:51
无名先森。 发表于 2020-11-1 22:35
复制到油猴提示脚本无效

头部加上,吾爱编辑器没显示出来
// ==UserScript==// @name         职教云自动答题// @namespace    http://zjy.com// @version      1.0// @description  职教云 自动答题// @author       Zhang Chenxi// @match        https://zjy2.icve.com.cn/*// @require      http://libs.baidu.com/jquery/2.0.0/jquery.min.js// @grant        GM_xmlhttpRequest// @grant        GM_download// ==/UserScript==
啊不知道啊6 发表于 2020-11-1 22:12
感谢楼主分享
现代吴彦祖 发表于 2020-11-1 22:14
感谢楼主分享

免费评分

参与人数 1吾爱币 +2 热心值 +1 收起 理由
张晨曦 + 2 + 1 热心回复!

查看全部评分

无名先森。 发表于 2020-11-1 22:35
复制到油猴提示脚本无效
风逝998 发表于 2020-11-1 23:21
感谢楼主分享
深水夜藏 发表于 2020-11-1 23:40
感谢分享学习了
mobin2618 发表于 2020-11-2 00:09
厉害了我的哥
王成 发表于 2020-11-2 07:23
有没人有把word文档当试卷的软件刷题用的软件
1404158661 发表于 2020-11-2 08:02
顶的啊 大佬
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则 警告:本版块禁止灌水或回复与主题无关内容,违者重罚!

快速回复 收藏帖子 返回列表 搜索

RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )

GMT+8, 2024-5-3 09:28

Powered by Discuz!

Copyright © 2001-2020, Tencent Cloud.

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