// ==UserScript==
// @name Crack Forclass 3
// @namespace https://www.forclass.tk/script?3
// @version 1.3.0
// @description 这同样适用于 Forclass,Sunclass,271BAY,Zhizhiniao
// @author Houtarchat
// @match *://*.forclass.net/Student/Dajx*
// @match *://*.271bay.com/Student/Dajx*
// @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
// @noframes
// ==/UserScript==
(function () {
'use strict';
/*jslint browser: true*/
/*global unsafeWindow*/
unsafeWindow.g_debugmode = true;
const aidx = unsafeWindow.getRequestParamValue('aidx');
const 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,
data:
JSON.stringify({
session: JSON.parse(unsafeWindow.sessionStorage.account).session,
page: 1,
paIdx: response.querySelector("ResultInfo > result > anyType > PAIdx").textContent,
score: '100',
comment: '',
}),
});
});
});
return;
}
window.alert('Houtarchat 破解!');
const datiurl =
`${location.protocol}//${location.host}/Student/Dati${location.search}${location.hash}`;
let pgzyurl =
`${location.protocol}//${location.host}/Student/Pgzy${location.search}${location.hash}`;
let sd = window.prompt('是否为您打开?\n输入0取消,\n输入1打开答题页面,\n输入2打开批阅页面');
if (sd !== '0') {
if (sd === '1') {
window.open(datiurl);
} else if (sd === '2') {
window.open(pgzyurl);
}
}
window.onload = () => {
$('.qoption input,.qoption textarea').unbind('cut copy paste');
};
})();