Loading... **引言** 近年来【超星/学习通】上线了【人脸识别】系统,即需要采集人脸才能进入课程学习和考试的系统。本篇文章将告诉你破解的代码~ **代码** 直接上代码,使用方法请自行研究~ <div class="tip inlineBlock share"> 注意:代码可用,只不过在二维码界面需要等待几秒才会自动跳转! </div> ``` // ==UserScript== // @name 学习通人脸识别|进入人脸课程 // @namespace unrival // @version 1.5 // @description 学习通课程遇到人脸识别自动通过,支持点进课程、点进章节 // @author unrival // @run-at document-end // @match https://*.chaoxing.com/visit/stucoursemiddle* // @match https://*.chaoxing.com/mycourse/studentstudy?* // @icon http://pan-yz.chaoxing.com/favicon.ico // @grant unsafeWindow // @connect mooc1-api.chaoxing.com // @grant GM_xmlhttpRequest // @license MIT // ==/UserScript== (function(){ var timmer = setInterval(function(){ try{ /*获取参数*/ var uuid = unsafeWindow.document.getElementById("uuid").value; var qrcEnc = unsafeWindow.document.getElementById("qrcEnc").value; var courseId = unsafeWindow.document.getElementById("fccourseId").value; var classId = unsafeWindow.document.getElementById("fcclazzId").value; /*生成随机objectId*/ var oidSample = "abcdefttguhhniafunrivvalaffxafcekyu2345678"; var oidSampleLen = oidSample.length; var oid = ""; for (var i = 0; i < 32; i++) oid += oidSample.charAt(Math.floor(Math.random() * oidSampleLen)); /*一版本人脸识别*/ var popElements = unsafeWindow.document.getElementsByClassName("popDiv wid640 faceCollectQrPop popClass"); var popVideoElements = unsafeWindow.document.getElementsByClassName("popDiv1 wid640 faceCollectQrPopVideo popClass"); if(popElements.length>0||popVideoElements.length>0){ console.log("一版本人脸识别"); var failTimeEs = unsafeWindow.document.getElementsByClassName("faceVideoCheckFailCount"); var failCount = "0"; if(failTimeEs.length>0){ failCount = failTimeEs[0].innerHTML; } GM_xmlhttpRequest({ method: "post", url: "https://mooc1-api.chaoxing.com/qr/updateqrstatus", data: "clazzId="+classId+"&courseId="+courseId+"&uuid="+uuid+"&objectId="+oid+"&qrcEnc="+qrcEnc+"&failCount="+failCount+"&compareResult=0", synchronous: true, headers: { "Content-Type": "application/x-www-form-urlencoded" }, onload: function(res){ console.log(res) }, onerror : function(err){ console.log(err); } }); return; } /*二版本人脸识别*/ var popElementss = unsafeWindow.document.getElementsByClassName("popDiv wid640"); if(popElementss.length<1){ return; } var faceElement = unsafeWindow.document.getElementById("fcqrimg"); if(faceElement==null){ return; } console.log("二版本人脸识别"); var knowledgeId = "0"; var knowledgeIdE = unsafeWindow.document.getElementById("chapterIdid"); if(knowledgeIdE!==null){ knowledgeId = knowledgeIdE.value; } console.log(JSON.stringify ({ clazzId : classId, courseId : courseId, knowledgeId : knowledgeId, uuid : uuid, qrcEnc : qrcEnc, objectId : oid })) GM_xmlhttpRequest({ method: "POST", url: "https://mooc1-api.chaoxing.com/knowledge/uploadInfo", synchronous: true, data: "clazzId="+classId+"&courseId="+courseId+"&knowledgeId="+knowledgeId+"&uuid="+uuid+"&qrcEnc="+qrcEnc+"&objectId="+oid, headers: { "Content-Type":"application/x-www-form-urlencoded" }, onload: function(res){ console.log(res) }, onerror : function(err){ console.log(err); } }); //clearInterval(timmer); }catch(err){ console.log(err); } },5000); })(); ``` 最后修改:2022 年 02 月 12 日 © 禁止转载 打赏 赞赏作者 支付宝微信 赞 19 分享不易,请老板打赏。
22 条评论
现在还能用吗?
1
1
1
1
1
1
1
1
1
1
1
1
1
1
怎么用代码
油猴,不过现在这个代码应该已经失效了
还是不行啊如果连续的两个人脸就只能跳过第一个,视频中的那个人脸就失效了
那没办法了,而且这个已经是很久之前的了
牛啊
大佬,这个代码应该放哪啊?我放在cmd不行
牛呀( ๑´•ω•) "(ㆆᴗㆆ)