// ==UserScript==
// @name EasyWJX-破解问卷星复制限制,全自动填写答案,绕过微信限制
// @namespace http://tampermonkey.net/
// @version 1.6.1
// @description 这个脚本可以帮助你绕过问卷星的复制限制,并且可以直接在问卷星的答题页面搜索答案,防止被企业版防作弊检测。同时可以自动清理cookie来绕过设备限制(部分浏览器可用)
// @author MelonFish
// @match https://ks.wjx.top/*/*
// @match http://ks.wjx.top/*/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net
// @grant none
// @require https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js
// @license GNU GPLv3
// @downloadURL none
// ==/UserScript==
(function() {
'use strict';
// Your code here...
console.log("EasyWJX is running. From xq.kzw.ink. Version 1.6.1")
if(window.location.protocol == 'https:') {
window.location.href = window.location.href.replace('https', 'http')
}
foreach();
deleteAllCookies();
if ($("#divTip").text().indexOf("最大填写次数")>=0) {
alert('监测到您可能被问卷星限制,这种情况请清空浏览器Cookie并重新联网(开一下飞行模式)再试')
}
$('#spanPower').html('线圈脚本提供破解')
// 破解复制限制
document.oncontextmenu = function () {return true;};
document.onselectstart = function () {return true;};
$("body").css("user-select", "text");
// 创建按钮
var addtrueans_btn = document.createElement("button"); //创建一个input对象(提示框按钮)
addtrueans_btn.textContent = "添加答对题目";
addtrueans_btn.style.width = "6rem";
addtrueans_btn.style.height = "1.5rem";
addtrueans_btn.style.marginLeft = "1rem";
addtrueans_btn.type = 'button';
addtrueans_btn.onclick = function (e){
var addtrueans_ls=prompt("请问需要将哪些题改为正确的?(输入题目ID,如需多个可用空格隔开,如需修改全部清输入“all”)")
if (addtrueans_ls!=null && addtrueans_ls!="") {
if (addtrueans_ls!='all') {
addtrueans_ls = addtrueans_ls.split(' ')
for (var i=0; i问卷星提供技术支持')
clear_btn.style.display = 'none';
addtrueans_btn.style.display = 'none';
var ques_titles = $('.data__tit_cjd');
for (var i=0; i0) {
if(window.location.protocol == 'https:') {
window.location.href = window.location.href.replace('https', 'http')
} else {
setTimeout(function () {
getAllAnswer_radio_input()
},2000)
// 放置题目ID
var ques_titles = $('.data__tit_cjd');
console.log(ques_titles.eq(0).text())
for (var i=0; i'+correct_num+'')
//$("span[style$='font-size:20px;']").text(correct_num)
$(".score-form__list.clearfix .tht-content span").text(correct_num)
}
if ($(".score-form__list.clearfix .tht-content").text().indexOf('名')>=0) {
var rank=prompt("修改后的名次(如果没有排名或者排名修改后出错请点击取消或留空)")
if (rank!=null && rank!="")
{
//$(".tbottom-title").eq(3).html(''+correct_num+'')
//$("span[style$='font-size:20px;']").text(correct_num)
$(".score-form__list.clearfix .tht-content").eq(1).text("第"+rank+"名")
}
}
}
}
} else {
/*
setTimeout(function () {
writeAnswer_radio_input()
},2000)
*/
var writeAnswer_btn = document.createElement("button"); //创建一个input对象(提示框按钮)
writeAnswer_btn.id = "writeAnswer_btn";
writeAnswer_btn.textContent = "自动填写";
writeAnswer_btn.style.width = "4rem";
writeAnswer_btn.style.height = "2rem";
writeAnswer_btn.style.marginLeft = '1rem';
writeAnswer_btn.type = 'button';
writeAnswer_btn.onclick = function (e){
writeAnswer_radio_input()
}
//writeLocalAnswer()
/*
var quickPass_btn = document.createElement("button"); //创建一个input对象(提示框按钮)
quickPass_btn.id = "quickPass_btn";
quickPass_btn.textContent = "速通";
quickPass_btn.style.width = "4rem";
quickPass_btn.style.height = "2rem";
quickPass_btn.style.marginLeft = '1rem';
quickPass_btn.type = 'button';
quickPass_btn.onclick = function (e){
}
*/
$('#toptitle h1').eq(0).append(writeAnswer_btn)
//$('#toptitle h1').eq(0).append(quickPass_btn)
}
if ($(".wxtxt").length >0) {
var r2=confirm("监测到微信限制。是否需要移除限制并查看题目(可以查看题目但无法提交)")
if (r2==true) {
$("#zhezhao2").remove();
$("#divContent").removeClass('disabled').removeClass('isblur');
$("#ctlNext").text('破解后可能无法提交')
setTimeout(function () {
alert("重要信息:破解只是删除遮挡,无法提交,建议搜索答案后用微信提交")
},500)
}
}
// 使用搜索的方式
var div_list = $(".field-label");
var btn_list = [];
// var btn = $('')
for (i=0; i -1 ? cookie.substr(0, eqPos) : cookie;
document.cookie = name +"=;";
//document.cookie = null
}
var cookies2 = document.cookie.split(";");
console.log(cookies2)
}
function DelCookie(name) {
var exp = new Date();
exp.setTime (exp.getTime() - 1);
var cval = GetCookie (name);
document.cookie = name + "=" + cval + "; expires="+ exp.toGMTString();
}
function foreach() {
var strCookie=document.cookie;
var arrCookie=strCookie.split("; "); // 将多cookie切割为多个名/值对
for(var i=0;i 0)
DelCookie(arr[0]);
}
}
function GetCookie(name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen)
{
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return GetCooki (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
function GetCooki(offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return decodeURIComponent(document.cookie.substring(offset, endstr));
}
function getAnswer_radio(str_id) {
// 问卷星迷惑行为: 是已选radio标志, 是未选标志,真的它俩不一样,不要尝试修改不然可能出问题。或者说我改成unicode字符是不是会好一点
// 好的我现在转换出来了,已选对应的unicode是\ue6df,未选对应的是\ue6e0,问卷星我真谢谢你
// 然后接着就发现h5里只支持10进制的所以还得转一下,现在h5对应的就是:选中:59103 未选:59104
// html里转译这种字符的方式就是:
// 又是阴间操作:多选题:勾选答案:, 未勾选:
var id = parseInt(str_id);
console.log('开始检查',id)
var ans_list_html = document.querySelector('.query__data-result.new__data-result');
var ans_data_key = ans_list_html.querySelectorAll('.data__key')[id]
if (ans_data_key && ans_data_key.querySelectorAll('.ulradiocheck').length !=0){
var ans_span_txt = ans_data_key.querySelector('.judge_ques_right span').innerText;
var ans_radio_list = ans_data_key.querySelectorAll('.ulradiocheck div')
if (ans_radio_list[0].querySelector('i').innerText=='' || ans_radio_list[0].querySelector('i').innerText==''){
// 普通radio单选
var true_ans_num=-1
var i=0
if (ans_span_txt == '回答正确'){
true_ans_num = -1
for (i=0; i=0) {
radios[l].click()
}
}
}
}
}
}
// 填写input
for (i=0; i')
console.log(ques_ls)
// 删除这个复制元素
input_group.remove()
for (var j=0; j=0){
true_ans = ans_res.replace('正确答案: ', '')
}
console.log(true_ans)
// 填入input内,这里可能会产生问题所以加上try
try{
original_input_group.querySelectorAll('.ui-input-text')[ij].value = true_ans
original_input_group.querySelectorAll('.textCont')[ij].innerText = true_ans
}catch{}
}
}
}
}
}
})
}
function changeAnsToTrue(str_id) {
var id = parseInt(str_id);
var ans_list_html = document.querySelector('.query__data-result.new__data-result');
console.log(ans_list_html);
var ans_title_list = ans_list_html.querySelectorAll('.data__tit_cjd')
for (var i=0; i {
setTimeout(() => {
resolve()
}, time * 1000)
})
}
/*
setTimeout(async function () {
while(true){
saveAnswerToLocal()
await sleep(1)
console.log('保存了一次答案')
}
}, 2000)
*/
function insertAfter(newElement,targetElement){
var parent = targetElement.parentNode;
if(parent.lastChild == targetElement){
parent.appendChild(newElement);
}else{
parent.insertBefore(newElement,targetElement.nextSibling);
}
}
function parseDom(arg) {
var objE = document.createElement("div");
objE.innerHTML = arg;
return objE;
};
})();