一键评教案例分析

功能

  • 一键评教(仅限普通课程)
  • 手动提交,请人工确认

使用教程

  1. 打开Chrome浏览器登录评教界面
  2. F12呼出开发人员工具
  3. 选择控制台
  4. 粘贴代码
  5. 回车

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-ICWiZu3b-1652977508551)(C:\Users\17376\AppData\Roaming\Typora\typora-user-images\image-20220519235246470.png)]

学习思路

分析页面框架

F12审查元素

经验告诉我:现在好多网页都是内部含框架,直接写代码肯定会报错

分析网页框架,发现有两个嵌套框架,所以我们需要先进入框架2中

iframe = document.getElementById("main");//进入框架一
iframe = iframe.contentWindow.document.getElementById("examTableFrame");//进入框架二
//调用时  document>iframe.contentWindow.document
contentDocument 属性

能够以 HTML 对象来返回 iframe 中的文档,简单来说就是将主document替换为框架内部的document

菜鸟论坛详解,但是例子不太好(太高深了看不懂),所以自己总结了上述这个例子进行理解

分析事件

分析网页元素

// 选项ID>checkbox类型>发现可点击onclick>调用函数
//所以只用模拟点击事件即可(click)
<input id="" name="firstcb_1" type="checkbox" οnclick="var vpn_return;eval(vpn_rewrite_js((function () { chooseOne(this,'firstcb_1'); }).toString().slice(14, -2), 2));return vpn_return;" value="5" checked="true">

// 文本框>text类型>使用Value方法赋值文本框内容
<input type="text" maxlength="100" name="fourthcb_1" value="教学认真" id="fourthcb_1" style="width:600px">

// 单选卡>radio类型>使用checked方法模拟勾选
<input type="radio" name="shouhuo" value="1" checked="true/">

模拟事件

具体不细讲,主要是分为定位元素+事件

此处要特别主要document应替换为iframe.contentWindow.document,我可能会写一篇常见的JS事件方法

输入文字

同上,通过给元素的value赋值即可

可优化之处

夸夸老师

可以从更多的方面夸老师,比如写点随机语句啥的

自动提交

也能做,就是怕有时候定位出问题,所以手动点击确认一下

连续提交

Emma,能做,但是不敢做

CV工程师参考文献

Checkbox菜鸟论坛

无意中发现的快速导出JS路径

源代码

/*Obfuscated by JShaman.com*/iframe=document['getElementById']('main');iframe=iframe['contentWindow']['document']['getElementById']('examTableFrame');iframe['contentWindow']['document']['querySelector']('#\x5c32\x201\x20>\x20td:nth-child(8)\x20>\x20input[type=checkbox]')['click']();try{iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(5)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(7)\x20>\x20td:nth-child(9)\x20>\x20input[type=checkbox]')['click']();iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(5)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(8)\x20>\x20td:nth-child(9)\x20>\x20input[type=checkbox]')['click']();iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(5)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(9)\x20>\x20td:nth-child(9)\x20>\x20input[type=checkbox]')['click']();iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(5)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(10)\x20>\x20td:nth-child(9)\x20>\x20input[type=checkbox]')['click']();iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(5)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(11)\x20>\x20td:nth-child(9)\x20>\x20input[type=checkbox]')['click']();iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(5)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(12)\x20>\x20td:nth-child(9)\x20>\x20input[type=checkbox]')['click']();iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(5)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(13)\x20>\x20td:nth-child(9)\x20>\x20input[type=checkbox]')['click']();iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(5)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(14)\x20>\x20td:nth-child(9)\x20>\x20input[type=checkbox]')['click']();}catch{x=0x24791^0x2479b;}try{iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(3)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(7)\x20>\x20td:nth-child(9)\x20>\x20input[type=checkbox]')['click']();iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(3)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(8)\x20>\x20td:nth-child(9)\x20>\x20input[type=checkbox]')['click']();iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(3)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(9)\x20>\x20td:nth-child(9)\x20>\x20input[type=checkbox]')['click']();iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(3)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(10)\x20>\x20td:nth-child(9)\x20>\x20input[type=checkbox]')['click']();iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(3)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(11)\x20>\x20td:nth-child(9)\x20>\x20input[type=checkbox]')['click']();iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(3)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(12)\x20>\x20td:nth-child(9)\x20>\x20input[type=checkbox]')['click']();iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(3)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(13)\x20>\x20td:nth-child(9)\x20>\x20input[type=checkbox]')['click']();iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(3)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(14)\x20>\x20td:nth-child(9)\x20>\x20input[type=checkbox]')['click']();}catch{x=0xdaaeb^0xdaae1;}iframe['contentWindow']['document']['querySelector']('#\x5c32\x202\x20>\x20td:nth-child(9)\x20>\x20input[type=checkbox]')['click']();iframe['contentWindow']['document']['querySelector']('#\x5c32\x203\x20>\x20td:nth-child(9)\x20>\x20input[type=checkbox]')['click']();iframe['contentWindow']['document']['querySelector']('#\x5c32\x204\x20>\x20td:nth-child(9)\x20>\x20input[type=checkbox]')['click']();iframe['contentWindow']['document']['querySelector']('#\x5c32\x205\x20>\x20td:nth-child(9)\x20>\x20input[type=checkbox]')['click']();iframe['contentWindow']['document']['querySelector']('#\x5c32\x206\x20>\x20td:nth-child(9)\x20>\x20input[type=checkbox]')['click']();iframe['contentWindow']['document']['querySelector']('#\x5c32\x207\x20>\x20td:nth-child(9)\x20>\x20input[type=checkbox]')['click']();iframe['contentWindow']['document']['querySelector']('#\x5c32\x208\x20>\x20td:nth-child(9)\x20>\x20input[type=checkbox]')['click']();iframe['contentWindow']['document']['querySelector']('#fourthcb_1')['value']='教学认真';iframe['contentWindow']['document']['querySelector']('#fourthcb_2')['value']='无';iframe['contentWindow']['document']['querySelector']('#fourthcb_3')['value']='系统性高';iframe['contentWindow']['document']['querySelector']('#fourthcb_4')['value']='无';try{try{iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(5)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(22)\x20>\x20td:nth-child(2)\x20>\x20input[type=radio]:nth-child(1)')['checked']=!![];iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(5)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(23)\x20>\x20td:nth-child(8)\x20>\x20b\x20>\x20input[type=checkbox]')['click']();}catch(_0x322998){iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(3)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(22)\x20>\x20td:nth-child(2)\x20>\x20input[type=radio]:nth-child(1)')['checked']=!![];iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(3)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(23)\x20>\x20td:nth-child(8)\x20>\x20b\x20>\x20input[type=checkbox]')['click']();}}catch{}try{try{iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(5)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(23)\x20>\x20td:nth-child(2)\x20>\x20input[type=radio]:nth-child(1)')['checked']=!![];iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(5)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(24)\x20>\x20td:nth-child(8)\x20>\x20b\x20>\x20input[type=checkbox]')['click']();}catch(_0x14837c){iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(3)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(23)\x20>\x20td:nth-child(2)\x20>\x20input[type=radio]:nth-child(1)')['checked']=!![];iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(3)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(24)\x20>\x20td:nth-child(8)\x20>\x20b\x20>\x20input[type=checkbox]')['click']();}}catch{}try{try{iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(5)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(24)\x20>\x20td:nth-child(2)\x20>\x20input[type=radio]:nth-child(1)')['checked']=!![];iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(5)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(25)\x20>\x20td:nth-child(8)\x20>\x20b\x20>\x20input[type=checkbox]')['click']();}catch(_0x25b128){iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(3)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(24)\x20>\x20td:nth-child(2)\x20>\x20input[type=radio]:nth-child(1)')['checked']=!![];iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(3)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(25)\x20>\x20td:nth-child(8)\x20>\x20b\x20>\x20input[type=checkbox]')['click']();}}catch{}try{try{iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(5)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(25)\x20>\x20td:nth-child(2)\x20>\x20input[type=radio]:nth-child(1)')['checked']=!![];iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(5)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(26)\x20>\x20td:nth-child(8)\x20>\x20b\x20>\x20input[type=checkbox]')['click']();}catch(_0x27f5af){iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(3)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(25)\x20>\x20td:nth-child(2)\x20>\x20input[type=radio]:nth-child(1)')['checked']=!![];iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(3)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(26)\x20>\x20td:nth-child(8)\x20>\x20b\x20>\x20input[type=checkbox]')['click']();}}catch{}try{try{iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(5)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(26)\x20>\x20td:nth-child(2)\x20>\x20input[type=radio]:nth-child(1)')['checked']=!![];iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(5)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(27)\x20>\x20td:nth-child(8)\x20>\x20b\x20>\x20input[type=checkbox]')['click']();}catch(_0x303f8c){iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(3)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(26)\x20>\x20td:nth-child(2)\x20>\x20input[type=radio]:nth-child(1)')['checked']=!![];iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(3)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(27)\x20>\x20td:nth-child(8)\x20>\x20b\x20>\x20input[type=checkbox]')['click']();}}catch{}try{try{iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(5)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(27)\x20>\x20td:nth-child(2)\x20>\x20input[type=radio]:nth-child(1)')['checked']=!![];iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(5)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(28)\x20>\x20td:nth-child(8)\x20>\x20b\x20>\x20input[type=checkbox]')['click']();}catch(_0x16e474){iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(3)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(27)\x20>\x20td:nth-child(2)\x20>\x20input[type=radio]:nth-child(1)')['checked']=!![];iframe['contentWindow']['document']['querySelector']('body\x20>\x20div:nth-child(3)\x20>\x20form\x20>\x20table\x20>\x20tbody\x20>\x20tr:nth-child(28)\x20>\x20td:nth-child(8)\x20>\x20b\x20>\x20input[type=checkbox]')['click']();}}catch{}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值