Crack Forclass

这同样适用于 Forclass,Sunclass,271BAY,Zhizhiniao

当前为 2021-04-19 提交的版本,查看 最新版本

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name               Crack Forclass
// @namespace          https://www.forclass.tk/script
// @version            3.4.1
// @description        这同样适用于 Forclass,Sunclass,271BAY,Zhizhiniao
// @author             Houtarchat
// @match              *://*.forclass.net/Student/Dati*
// @match              *://*.271bay.com/Student/Dati*
// @match              *://web.zhizhiniao.com/Student/Dati*
// @contributionURL    https://www.houtarchat.ml/donate.html
// @contributionAmount 5 RMB
// @license            GNU General Public License
// @run-at             document-idle
// ==/UserScript==
(function () {
  "use strict";

  /*jslint browser: true */
  /*global unsafeWindow */

  unsafeWindow.g_debugmode = true;
  let aidx = unsafeWindow.getRequestParamValue("aidx");
  let paidx = unsafeWindow.getRequestParamValue("paidx");

  if (unsafeWindow.getRequestParamValue("type") === "5" && window.confirm("一键完成&批阅?")) {
    $.ajax({
      url:
        location.protocol + "//" + location.host + "/ANAService.asmx/UploadAttachmentPaperAnswer2",
      method: "POST",
      timeout: 0,
      data:
        {
          session: unsafeWindow.getSession(),
          page: 1,
          aidx,
          studentAnswer: "<style>[ads]{vertical-align:baseline;font-weight:400;font-style:normal;font-size:14px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.3em;letter-spacing:0}[ads] a{text-decoration:none}[ads] .ea-content{margin:1em 1em .5em;padding:1em;background:rgba(0,0,0,.03);color:#505050}[ads] .ea-content a:link,[ads] .ea-content a:visited{color:#505050}[ads] .ea-content a:active,[ads] .ea-content a:hover{color:#373737}[ads] .ea-content a b,[ads] .ea-content a strong{color:#088cdb}[ads] .ea-callout a:link,[ads] .ea-callout a:visited{color:#6a6a6a}[ads] .ea-callout a:active,[ads] .ea-callout a:hover{color:#505050}[ads] .ea-callout a{font-size:.8em}[ads] .ea-content{border:0;border-radius:3px;box-shadow:0 2px 3px rgba(0,0,0,.15)}[ads] .ea-content{border:0;border-radius:3px;box-shadow:none}[ads]{font-size:14px}[ads] .ea-content{text-align:left}[ads] .ea-callout{margin:.5em 1em 1em;padding-right:1em;padding-left:1em;text-align:right;font-style:italic}</style><div ads><div class=\"ea-content\"><a href=\"https://greasyfork.org/zh-CN/scripts?set=451857\" rel=\"nofollow\" target=\"_blank\"><strong>Crack Forclass: </strong><span>The best plugin for Forclass.</span> <strong>Try it now!</strong></a></div><div class=\"ea-callout\"><a target=\"_blank\" href=\"https://greasyfork.org/zh-CN/users/614734-houtar0chat\">Ad by Houtarchat</a></div></div>",
          studentAnswerURL: "",
          size: ""
        }
    }).done(() => {
      $.ajax({
        url:
          `${location.protocol}//${location.host}/ANAService.asmx/GetStudentAnsweredPaper`,
        method: "POST",
        timeout: 0,
        data:
          {
            session: unsafeWindow.getSession(),
            page: 1,
            paidx,
            aidx
          }
      }).done((response) => {
        $.ajax({
          url:
            `${location.protocol}//${location.host}/ANAService.asmx/SetAssignmentPaperAnswer`,
          method: 'POST',
          timeout: 0,
          contentType: "application/json; charset=utf-8",
          dataType: "json",
          data:
            JSON.stringify({
              session: JSON.parse(unsafeWindow.sessionStorage.account).session,
              paIdx: response.querySelector("ResultInfo > result > anyType > PAIdx").textContent,
              score: '100',
              comment: '',
              page: 0,
            }),
        });
      });
    });
    return;
  }

  window.alert("Houtarchat 破解!");
  let hourEle = unsafeWindow.document.getElementById("hour");
  let minEle = unsafeWindow.document.getElementById("minute");
  let secEle = unsafeWindow.document.getElementById("second");
  hourEle.contentEditable = 'true';
  minEle.contentEditable = 'true';
  secEle.contentEditable = 'true';

  unsafeWindow.tick = () => {
    unsafeWindow.sessionStorage.second = secEle.innerHTML;
    unsafeWindow.sessionStorage.minute = minEle.innerHTML;
    unsafeWindow.sessionStorage.hour = hourEle.innerHTML;
  };

  unsafeWindow.polling4Submit = () => {
  };

  let dajxurl =
    `${unsafeWindow.location.protocol}//${unsafeWindow.location.host}/Student/Dajx${location.search}${location.hash}`;
  let sd = window.prompt(
    "答案已经被检测到,是否为您打开?\n输入0取消,\n输入1打开弹出式页面,\n输入2打开frame页面"
  );

  if (sd !== "0") {
    if (sd === "1") {
      window.open(dajxurl);
    } else if (sd === "2") {
      let out = unsafeWindow.document.createElement("div");
      out.setAttribute("class", "dlg-out");
      out.setAttribute(
        "style",
        "z-index:3000;left:362.5px;top:140.5px;display:block"
      );
      unsafeWindow.document.querySelector("#main").appendChild(out);
      let bar = unsafeWindow.document.createElement("div");
      bar.setAttribute("class", "dlg-bar");
      out.appendChild(bar);
      let title = unsafeWindow.document.createElement("div");
      title.setAttribute("class", "dlg-title");
      title.innerText = "Houtarchat";
      bar.appendChild(title);
      let rtbtns = unsafeWindow.document.createElement("div");
      rtbtns.setAttribute("class", "dlg-rtbtns-out");
      bar.appendChild(rtbtns);
      let closeE = unsafeWindow.document.createElement("div");
      closeE.setAttribute("class", "dlg-close-e");
      closeE.setAttribute(
        "style",
        "text-align:center;width:34px;height:39px;display:inline-block;cursor:pointer;vertical-align:top;cursor:pointer;font-size:21px;font-weight:700"
      );
      closeE.innerText = "×";
      rtbtns.appendChild(closeE);
      let body = unsafeWindow.document.createElement("iframe");
      body.setAttribute("class", "dlg-body");
      body.setAttribute("src", dajxurl);
      body.setAttribute(
        "style",
        "height:250px;width:450px;left:0;overflow:scroll;"
      );
      body.setAttribute("scrolling", "yes");
      out.appendChild(body);

      closeE.onclick = () => {
        out.style.display = "none";
      };


      body.onload = () => {
        let content = unsafeWindow.document.querySelector(
          "#main > div:nth-child(10) > iframe"
        ).contentDocument;
        let style = content.createElement("style");
        style.innerText = "*{max-width:520px!important;}";
        content.querySelector("head").appendChild(style);
        content.querySelector("body").setAttribute("style", "width: 1040px;");
        content
          .querySelector("#main > div.el-main.el-w1200")
          .setAttribute("style", "width:520px");
        content
          .querySelector(
            "#main > div.el-main.el-w1200 > div > div.el-stu-out.el-stu-content"
          )
          .setAttribute("style", "width:520px");
        content
          .querySelector(
            "#main > div.el-main.el-w1200 > div > div.el-stu-out.el-stu-content > div"
          )
          .setAttribute("style", "width:520px");
        content
          .querySelector(
            "#main > div.el-main.el-w1200 > div > div.el-stu-out.el-stu-content > div.el-main-right.el-stu-manual-r > div > div"
          )
          .setAttribute("style", "width:520px");
        content.querySelector("#header").remove();
        content.querySelector("#footer").remove();
        content
          .querySelector("#main > div.el-main.el-w1200 > div > div.totop")
          .remove();
        content
          .querySelector(
            "#main > div.el-main.el-w1200 > div > div.el-stu-out.el-stu-content > div.el-main-left.el-main-left-thin"
          )
          .remove();
      };
    }
  }

  unsafeWindow.$(".qoption input,.qoption textarea").unbind("cut copy paste");
  unsafeWindow.document
    .querySelector(
      "#paperoperation > div.el-dati-funcs.el-upload-submit > div.el-dati-submit-td"
    )
    .setAttribute("class", "el-dati-submit-td");

})();