油猴插件:点击下载

没有油猴可以直接运行核心代码:

F12 – 控制台粘贴后按回车执行

学校的教务系统版本为V8.0.0,其他版本能不能用未知,欢迎提供测试平台

// 等待表单加载时间,如果执行出错尝试提高此时间
const awaitTime = 1000

// 修改UA绕过检测
const UAs = [
	'Mozilla/5.0 (Linux; Android 12.0; Pixel 5 XL) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.86 Mobile Safari/537.36',
	'Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148',
	'Mozilla/5.0 (Linux; Android 10.0.0; Pixel 5 XL Build/OPP3.9705110.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.36 Mobile Safari/537.36',
	'Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1 Mobile/15E148 Safari/604.1',
	'Mozilla/5.0 (Linux; Android 10.1; Pixel 5 XL Build/OPM1.67011110.001) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.50 Mobile Safari/537.36'
]
Object.defineProperty(navigator, 'userAgent', {
    value: UAs[Math.floor(Math.random() * 5)],
    writable: false
})

const sleep = ms => new Promise(r => setTimeout(r, ms))

let toEva = document.getElementsByTagName('tbody')[0].childNodes
for (let id_ in toEva)
{
	if (typeof(toEva[id_]) === 'object')
	{
		if (toEva[id_].getAttribute('role') === 'row')
		{
			let stat = toEva[id_].childNodes[7].getAttribute('title')
			if (stat === '未评')
			{
				toEva[id_].click()
				await sleep(awaitTime + Math.floor(Math.random() * 100))
				let checkboxes = document.getElementsByClassName("radio-pjf")
				let rnd = Math.floor(Math.random() * 10)
				console.log(rnd * 5)
				for (let id in checkboxes)
				{
					if (typeof(checkboxes[id]) === 'object')
					{
						if (id == rnd * 5)
						{
							checkboxes[parseInt(id) + 1].checked = true
						}
						else if (checkboxes[id].getAttribute('data-sfzd') === '1')
						{
							checkboxes[id].checked = true
						}
					}
				}
				document.getElementById('btn_xspj_tj').click()
			}
		}
	}
}

location.reload()

 

发表回复

您的电子邮箱地址不会被公开。