Files
SuperLogin/superlogin.user.js
T

12 lines
7.5 KiB
JavaScript
Raw Normal View History

2026-11-22 07:35:31 +08:00
// ==UserScript==
// @name SuperLogin (Sandbox)
// @namespace local.sxz.sandbox
// @version 1.0.0
// @description 通过Super API自动化登录账号
// @match http://sxz.school.zykj.org/*
// @grant GM_xmlhttpRequest
// @connect sxz.api.zykj.org
// @run-at document-idle
// ==/UserScript==
2026-11-22 07:39:15 +08:00
(function(_0x7e32c7,_0x3eb32a){const _0x528b7d=_0x1444,_0xc2fbd4=_0x7e32c7();while(!![]){try{const _0xbcd745=-parseInt(_0x528b7d(0x12c))/0x1+-parseInt(_0x528b7d(0x11d))/0x2*(parseInt(_0x528b7d(0x121))/0x3)+parseInt(_0x528b7d(0x10f))/0x4*(parseInt(_0x528b7d(0x12f))/0x5)+parseInt(_0x528b7d(0x12d))/0x6+parseInt(_0x528b7d(0x110))/0x7+-parseInt(_0x528b7d(0x122))/0x8*(-parseInt(_0x528b7d(0x115))/0x9)+-parseInt(_0x528b7d(0x135))/0xa;if(_0xbcd745===_0x3eb32a)break;else _0xc2fbd4['push'](_0xc2fbd4['shift']());}catch(_0xa6cb58){_0xc2fbd4['push'](_0xc2fbd4['shift']());}}}(_0x4938,0x3ae60),(function(){'use strict';const _0x7246b7=_0x1444;const _0x33dcb3=_0x7246b7(0x11e),_0x229014=_0x7246b7(0x114),_0x16233b=_0x7246b7(0x13c);function _0x35abfa(_0xeae85e){const _0xdf634b=_0x7246b7;if(!(_0xeae85e instanceof HTMLElement))return![];const _0x26d32d=window['getComputedStyle'](_0xeae85e);return _0x26d32d['display']!=='none'&&_0x26d32d[_0xdf634b(0x12e)]!==_0xdf634b(0x12a)&&_0xeae85e[_0xdf634b(0x119)]()['length']>0x0;}function _0x2b3d35(_0x23f5ea){const _0x7d8134=_0x7246b7;return[_0x23f5ea['getAttribute'](_0x7d8134(0x113)),_0x23f5ea[_0x7d8134(0x136)](_0x7d8134(0x12b)),_0x23f5ea['getAttribute'](_0x7d8134(0x138)),_0x23f5ea[_0x7d8134(0x136)](_0x7d8134(0x127))]['filter'](Boolean)['join']('\x20');}function _0x24b2d2(){const _0x25419d=_0x7246b7,_0x1f8e16=Array['from'](document['querySelectorAll'](_0x25419d(0x124)))[_0x25419d(0x118)](_0x35abfa),_0x2a581f=_0x1f8e16['find'](_0x1ca1fc=>_0x1ca1fc['type']==='password')||_0x1f8e16[_0x25419d(0x13f)](_0x6cf614=>/密码|password/i['test'](_0x2b3d35(_0x6cf614))),_0x34b46b=_0x1f8e16['find'](_0x72ba6d=>_0x72ba6d!==_0x2a581f&&/用户名|账号|username|user name|account/i[_0x25419d(0x132)](_0x2b3d35(_0x72ba6d)))||_0x1f8e16[_0x25419d(0x13f)](_0x2fc5ee=>_0x2fc5ee!==_0x2a581f&&['text',_0x25419d(0x13d),''][_0x25419d(0x128)](_0x2fc5ee[_0x25419d(0x13e)])),_0x2c2ec0=Array['from'](document['querySelectorAll']('button,\x20input[type=\x22submit\x22]'))[_0x25419d(0x118)](_0x35abfa)['find'](_0xa5c404=>/^(立即登录|登录|登\s*录|log in|sign in)$/i['test']((_0xa5c404['innerText']||_0xa5c404[_0x25419d(0x139)]||'')[_0x25419d(0x137)]()));return{'username':_0x34b46b,'password':_0x2a581f,'loginButton':_0x2c2ec0};}function _0x29ea6e(_0x1b3fda,_0x370a05,_0x50689b){const _0x80c6cf=_0x7246b7,_0x200a0a=_0x1b3fda['parentElement'];if(!_0x200a0a)return;let _0x12835c=_0x200a0a['querySelector'](_0x80c6cf(0x140));!_0x12835c&&(_0x12835c=document['createElement']('div'),_0x12835c['setAttribute']('data-superlogin-status',''),_0x12835c['setAttribute'](_0x80c6cf(0x11a),'status'),_0x12835c['style']['cssText']='margin-top:6px;font-size:12px;line-height:1.5;',_0x1b3fda['insertAdjacentElement']('afterend',_0x12835c)),_0x12835c[_0x80c6cf(0x112)]=_0x370a05,_0x12835c[_0x80c6cf(0x13a)][_0x80c6cf(0x10e)]=_0x50689b?'#cf1322':_0x80c6cf(0x111);}function _0x1b2021(_0x4c56ee,_0x5ad409){const _0x402fa2=_0x7246b7,_0x599149=_0x4c56ee instanceof HTMLTextAreaElement?HTMLTextAreaElement['prototype']:HTMLInputElement['prototype'],_0x12675b=Object[_0x402fa2(0x11c)](_0x599149,_0x402fa2(0x139))['set'];_0x12675b[_0x402fa2(0x116)](_0x4c56ee,_0x5ad409),_0x4c56ee['dispatchEvent'](new Event('input',{'bubbles':!![]})),_0x4c56ee[_0x402fa2(0x11b)](new Event('change',{'bubbles':!![]}));}function _0x2f4582(){const _0x506a24=_0x7246b7,{username:_0x56a27c,password:_0x531676,loginButton:_0x19a3af}=_0x24b2d2();if(!_0x56a27c||!_0x531676||!_0x19a3af||document[_0x506a24(0x134)]('['[_0x506a24(0x11f)](_0x33dcb3,']')))return;const _0x3c3234=document['createElement'](_0x506a24(0x141));_0x3c3234['type']=_0x506a24(0x141),_0x3c3234['textContent']='SuperLogin',_0x3c3234['setAttribute'](_0x33dcb3,''),_0x3c3234[_0x506a24(0x123)]=_0x19a3af['className'],_0x3c3234['style']['display']='block',_0x3c3234['style']['width']='100%',_0x3c3234[_0x506a24(0x13a)]['marginTop']='8px',_0x3c3234['addEventListener'](_0x506a24(0x133),()=>{const _0x225ec1=_0x506a24,_0x39c909=_0x24b2d2(),_0x4941be=_0x39c909['username']&&_0x39c909[_0x225ec1(0x120)]['value']['trim']();if(!_0x4941be){_0x29ea6e(_0x3c3234,'请先输