「校務行政系統」修訂間的差異
跳至導覽
跳至搜尋
Yianlee2008(留言 | 貢獻) (→閒置自動登出) |
Yianlee2008(留言 | 貢獻) (→閒置自動登出) |
||
| 行 87: | 行 87: | ||
=== 登出方法 === | === 登出方法 === | ||
轉網址至Login.aspx即可登出 | 轉網址至Login.aspx即可登出 | ||
| + | |||
| + | == 完整相關程式碼 == | ||
| + | <syntaxhighlight lang="javascript" line start="230"> | ||
| + | 230|function inactivityTime() { | ||
| + | 231| var ast; | ||
| + | 232| var aspostback = new Date(); | ||
| + | 233| //window.onload = resetTimer; | ||
| + | 234| // DOM Events | ||
| + | 235| window.onmousemove = resetTimer; | ||
| + | 236| window.onkeypress = resetTimer; | ||
| + | 237| window.addEventListener("compositionupdate", resetTimer); | ||
| + | 238| //window.onmousedown = resetTimer; // catches touchscreen presses | ||
| + | 239| //window.onclick = resetTimer; // catches touchpad clicks | ||
| + | 240| //window.onscroll = resetTimer; // catches scrolling with arrow keys | ||
| + | 241| resetTimer; | ||
| + | 242| | ||
| + | 243| function logout() { | ||
| + | 244| //alert("閒置時間過久,請重新登入"); | ||
| + | 245| //window.location = "Login.aspx"; | ||
| + | 246| var pagename = "Login.aspx"; | ||
| + | 247| var arrPath = location.pathname.split('/'); | ||
| + | 248| if (arrPath.length > 0) { | ||
| + | 249| if (arrPath[arrPath.length - 1].toLowerCase().indexOf('.aspx') > -1) { | ||
| + | 250| pagename = arrPath[arrPath.length - 1].toLowerCase(); | ||
| + | 251| } | ||
| + | 252| } | ||
| + | 253| if (pagename.toUpperCase() != "LOGIN.ASPX") { | ||
| + | 254| var asrelogintag; | ||
| + | 255| var asreloginoutframe = window.top.document.getElementsByTagName('iframe'); | ||
| + | 256| while(asreloginoutframe.length > 0){ | ||
| + | 257| var ifinalframe = 0; | ||
| + | 258| for(var ipopc = 0; ipopc < asreloginoutframe.length; ipopc++){ | ||
| + | 259| var poptmp = asreloginoutframe[ipopc].contentWindow.document.getElementById('asrelogin'); | ||
| + | 260| if(poptmp){ | ||
| + | 261| asrelogintag = poptmp; | ||
| + | 262| break; | ||
| + | 263| } | ||
| + | 264| if(asreloginoutframe[ipopc].id == 'iframecontent'){ | ||
| + | 265| ifinalframe = ipopc; | ||
| + | 266| } | ||
| + | 267| } | ||
| + | 268| asframetmp = asreloginoutframe[ifinalframe].contentWindow.document.getElementsByTagName('iframe'); | ||
| + | 269| asreloginoutframe = asframetmp; | ||
| + | 270| } | ||
| + | 271| var basrelogin = false; | ||
| + | 272| if(window.top.document.getElementById('ReLogin_div')){ | ||
| + | 273| basrelogin = true; | ||
| + | 274| }else{ | ||
| + | 275| asreloginoutframe = window.top.document.getElementsByTagName('iframe'); | ||
| + | 276| while(asreloginoutframe.length > 0){ | ||
| + | 277| var ifinalframe = 0; | ||
| + | 278| for(var ipopc = 0; ipopc < asreloginoutframe.length; ipopc++){ | ||
| + | 279| var poptmp = asreloginoutframe[ipopc].contentWindow.document.getElementById('ReLogin_div'); | ||
| + | 280| if(poptmp){ | ||
| + | 281| basrelogin = true; | ||
| + | 282| break; | ||
| + | 283| } | ||
| + | 284| if(asreloginoutframe[ipopc].id == 'iframecontent'){ | ||
| + | 285| ifinalframe = ipopc; | ||
| + | 286| } | ||
| + | 287| } | ||
| + | 288| asframetmp = asreloginoutframe[ifinalframe].contentWindow.document.getElementsByTagName('iframe'); | ||
| + | 289| asreloginoutframe = asframetmp; | ||
| + | 290| } | ||
| + | 291| } | ||
| + | 292| | ||
| + | 293| if (asrelogintag) { | ||
| + | 294| if(!basrelogin){ | ||
| + | 295| var asreloginchk; | ||
| + | 296| var website = location.href; | ||
| + | 297| website = website.substring(0, website.lastIndexOf('/') + 1); | ||
| + | 298| try { | ||
| + | 299| var asreloginclient = getXmlHttpRequestObject(); | ||
| + | 300| asreloginclient.onreadystatechange = function () { | ||
| + | 301| if (asreloginclient.readyState == 4 && asreloginclient.status == 200) { | ||
| + | 302| asreloginchk = asreloginclient.getResponseHeader("asui"); | ||
| + | 303| } | ||
| + | 304| } | ||
| + | 305| asreloginclient.open("GET", encodeURI(website + "AsCheck.ashx"), false); | ||
| + | 306| asreloginclient.send(); | ||
| + | 307| } | ||
| + | 308| catch (e) { | ||
| + | 309| } | ||
| + | 310| | ||
| + | 311| if(!asreloginchk){ | ||
| + | 312| //ReloginWindow(); | ||
| + | 313| } | ||
| + | 314| } | ||
| + | 315| } | ||
| + | 316| else { | ||
| + | 317| alert("閒置時間過久,請重新登入"); | ||
| + | 318| window.top.location = "../Login.aspx"; | ||
| + | 319| } | ||
| + | 320| } | ||
| + | 321| } | ||
| + | 322| | ||
| + | 323| function resetTimer() { | ||
| + | 324| console.log("resetTimer"); | ||
| + | 325| window.top.clearTimeout(ast); | ||
| + | 326| var sessionTimeoutWarning = 20; //min | ||
| + | 327| var sTimeout = parseInt(sessionTimeoutWarning) * 60 * 1000; | ||
| + | 328| ast = window.top.setTimeout(logout, sTimeout); | ||
| + | 329| var current = new Date(); | ||
| + | 330| if (((current.getTime() - aspostback.getTime())/60000)>15) | ||
| + | 331| { | ||
| + | 332| try { | ||
| + | 333| var astimerclient = getXmlHttpRequestObject(); | ||
| + | 334| astimerclient.open("GET", encodeURI("AsCheck.ashx"), false); | ||
| + | 335| astimerclient.send(); | ||
| + | 336| } | ||
| + | 337| catch (e) { | ||
| + | 338| } | ||
| + | 339| aspostback = new Date(); | ||
| + | 340| console.log("AsCheck"); | ||
| + | 341| } | ||
| + | 342| // 1000 milisec = 1 sec | ||
| + | 343| } | ||
| + | 344|}; | ||
| + | |||
| + | </syntaxhighlight> | ||
== 隱藏物件 == | == 隱藏物件 == | ||
於 2024年7月12日 (五) 17:43 的修訂
| 校務行政系統 | |
|---|---|
| 開發者 | 亞昕資訊股份有限公司 |
| 首次開放 | 2020年 |
| 原始碼 | 不開源(似乎) |
| 目前版本 | 未知 |
| 程式語言 | C++、C# (ASP.NET) |
| 作業環境 | Chrome |
| 授權條款 | All Rights Reserved |
史上最慢的系統
工程師版本(外掛版)
幫你修正讓這個系統更好用一點,選自己喜歡的用,不是廣告!!!
KnowScratcher - Better CYSH System
KnowScratcher - Better CYSH System
技術紀載
沒有破解做不到
- 使用外部圖片
- 連接外部網站
- 使用外部檔案
JQuery版本
3.6.1
CSP
default-src 'self'; connect-src 'self'; font-src 'self' data:; frame-src 'self' blob: data:; img-src 'self' blob: data:; media-src 'self'; object-src 'self' blob: data:; script-src 'self' blob: data: 'unsafe-inline' 'unsafe-eval' https://accounts.google.com/; style-src 'self' 'unsafe-inline'; frame-ancestors 'self' ;
平均載入時間
3.5秒
閒置自動登出
20分鐘
可使用resetTimer();來防止(如果你能access的話)
或是呼叫"compositionupdate"的事件也可以觸發
相關程式碼寫於ASLoadProgress.js
event listener: ASLoadProgress.js
235|window.onmousemove = resetTimer;
236|window.onkeypress = resetTimer;
237|window.addEventListener("compositionupdate", resetTimer);resetTimer: ASLoadProgress.js
323|function resetTimer() {
324| console.log("resetTimer");
325| window.top.clearTimeout(ast);
326| var sessionTimeoutWarning = 20; //min
327| var sTimeout = parseInt(sessionTimeoutWarning) * 60 * 1000;
328| ast = window.top.setTimeout(logout, sTimeout);
329| var current = new Date();
330| if (((current.getTime() - aspostback.getTime())/60000)>15)
331| {
332| try {
333| var astimerclient = getXmlHttpRequestObject();
334| astimerclient.open("GET", encodeURI("AsCheck.ashx"), false);
335| astimerclient.send();
336| }
337| catch (e) {
338| }
339| aspostback = new Date();
340| console.log("AsCheck");
341| }
342| // 1000 milisec = 1 sec
343| }登出方法
轉網址至Login.aspx即可登出
完整相關程式碼
230|function inactivityTime() {
231| var ast;
232| var aspostback = new Date();
233| //window.onload = resetTimer;
234| // DOM Events
235| window.onmousemove = resetTimer;
236| window.onkeypress = resetTimer;
237| window.addEventListener("compositionupdate", resetTimer);
238| //window.onmousedown = resetTimer; // catches touchscreen presses
239| //window.onclick = resetTimer; // catches touchpad clicks
240| //window.onscroll = resetTimer; // catches scrolling with arrow keys
241| resetTimer;
242|
243| function logout() {
244| //alert("閒置時間過久,請重新登入");
245| //window.location = "Login.aspx";
246| var pagename = "Login.aspx";
247| var arrPath = location.pathname.split('/');
248| if (arrPath.length > 0) {
249| if (arrPath[arrPath.length - 1].toLowerCase().indexOf('.aspx') > -1) {
250| pagename = arrPath[arrPath.length - 1].toLowerCase();
251| }
252| }
253| if (pagename.toUpperCase() != "LOGIN.ASPX") {
254| var asrelogintag;
255| var asreloginoutframe = window.top.document.getElementsByTagName('iframe');
256| while(asreloginoutframe.length > 0){
257| var ifinalframe = 0;
258| for(var ipopc = 0; ipopc < asreloginoutframe.length; ipopc++){
259| var poptmp = asreloginoutframe[ipopc].contentWindow.document.getElementById('asrelogin');
260| if(poptmp){
261| asrelogintag = poptmp;
262| break;
263| }
264| if(asreloginoutframe[ipopc].id == 'iframecontent'){
265| ifinalframe = ipopc;
266| }
267| }
268| asframetmp = asreloginoutframe[ifinalframe].contentWindow.document.getElementsByTagName('iframe');
269| asreloginoutframe = asframetmp;
270| }
271| var basrelogin = false;
272| if(window.top.document.getElementById('ReLogin_div')){
273| basrelogin = true;
274| }else{
275| asreloginoutframe = window.top.document.getElementsByTagName('iframe');
276| while(asreloginoutframe.length > 0){
277| var ifinalframe = 0;
278| for(var ipopc = 0; ipopc < asreloginoutframe.length; ipopc++){
279| var poptmp = asreloginoutframe[ipopc].contentWindow.document.getElementById('ReLogin_div');
280| if(poptmp){
281| basrelogin = true;
282| break;
283| }
284| if(asreloginoutframe[ipopc].id == 'iframecontent'){
285| ifinalframe = ipopc;
286| }
287| }
288| asframetmp = asreloginoutframe[ifinalframe].contentWindow.document.getElementsByTagName('iframe');
289| asreloginoutframe = asframetmp;
290| }
291| }
292|
293| if (asrelogintag) {
294| if(!basrelogin){
295| var asreloginchk;
296| var website = location.href;
297| website = website.substring(0, website.lastIndexOf('/') + 1);
298| try {
299| var asreloginclient = getXmlHttpRequestObject();
300| asreloginclient.onreadystatechange = function () {
301| if (asreloginclient.readyState == 4 && asreloginclient.status == 200) {
302| asreloginchk = asreloginclient.getResponseHeader("asui");
303| }
304| }
305| asreloginclient.open("GET", encodeURI(website + "AsCheck.ashx"), false);
306| asreloginclient.send();
307| }
308| catch (e) {
309| }
310|
311| if(!asreloginchk){
312| //ReloginWindow();
313| }
314| }
315| }
316| else {
317| alert("閒置時間過久,請重新登入");
318| window.top.location = "../Login.aspx";
319| }
320| }
321| }
322|
323| function resetTimer() {
324| console.log("resetTimer");
325| window.top.clearTimeout(ast);
326| var sessionTimeoutWarning = 20; //min
327| var sTimeout = parseInt(sessionTimeoutWarning) * 60 * 1000;
328| ast = window.top.setTimeout(logout, sTimeout);
329| var current = new Date();
330| if (((current.getTime() - aspostback.getTime())/60000)>15)
331| {
332| try {
333| var astimerclient = getXmlHttpRequestObject();
334| astimerclient.open("GET", encodeURI("AsCheck.ashx"), false);
335| astimerclient.send();
336| }
337| catch (e) {
338| }
339| aspostback = new Date();
340| console.log("AsCheck");
341| }
342| // 1000 milisec = 1 sec
343| }
344|};隱藏物件
格視為html selector
slogan
#form1 > table > tbody > tr > td > div:nth-child(2)
修改密碼
#divsecrecy_outer_id
帳號資訊
#divinfo_outer_id
操作手冊
#divpaper_outer_id
更多工具
#divastools_outer_id
成年
#divadult_outer_id
綁定裝置
#divprivacy_outer_id
iframe位置
所有第三層頁面
好笑的
- 這個系統引進jquery,但還是有很多時候是原始方法硬幹
- Javascript都亂放,一下放html裡一下放js檔案
- 等server回應真的TMD久
- 頭像是用fixed的方式定位
- 該flex的地方不flex,不該flex的地方flex
