Git Product home page Git Product logo

vizpowerhook's Introduction

Hi there 👋

💬 My Blog: https://blog.lyc8503.net

✔ Status Page: https://status.lyc8503.net powered by my own project UptimeFlare

  • 😄 Junior Majoring in Software Engineering(aka. 文档学院) at NJU. | 我是古希腊掌管 prompt 的神!
  • 🔭 Currently trying to operate an autonomous system.
  • ⚡ To-study/do List: Write some more blogs, maybe learn more C++ in my summer internship.
  • 🐟 Fish touching.
  • 🎮 Sometimes play Minecraft modpacks, currently playing Enigmatica 2: Expert.
  • 🔑 My GPG Pubkey [rotated 2024-06-25]

Metrics

vizpowerhook's People

Contributors

anguei avatar lyc8503 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vizpowerhook's Issues

[Feature Request] 课堂防踢

查找了整个源代码,只有一个地方发现了「管理员请你离开」字符串,位置是 vizpower/imeeting/imeetingApp.java

    public void setKickoutInfo(int nReason) {
        if (nReason == 1) {
            this.m_strLastExitReason = "抱歉,管理员请你离开!";
            this.m_bReturnToLoginView = true;
        } else if (nReason == 2) {
            this.m_strLastExitReason = "您的账号在另一处登录,当前客户端被强制下线";
            this.m_bReturnToLoginView = true;
        } else if (nReason == 3) {
            this.m_strLastExitReason = "抱歉,服务器通信失败,客户端将退出!";
        } else if (nReason == 4) {
            this.m_strLastExitReason = "课堂时间到,客户端将退出!";
        } else if (nReason == 5) {
            this.m_strLastExitReason = "主讲已经结束了课堂,客户端将退出!";
        } else if (nReason == 6) {
            this.m_strLastExitReason = "新的主讲已在其他设备登录,您已被退出课堂!";
        } else if (nReason == 7) {
            this.m_strLastExitReason = "抱歉,您的设备时间异常,请重新登录!";
            this.m_bReturnToLoginView = true;
        }
    }
    // 使用 python 手动把 \u 转化成了中文

另外,在 vizpower/imeeting/MainActivity[HD].javavizpower/imeeting/MainActivityTeacher[HD].javavizpower/imeeting/AssistantActivity.java 里面,有 setKickoutInfo(int) 的调用:

    public void kickout(int nReason) {
        if (!this.m_bIsKickouting) {
            this.m_bIsKickouting = true;
            iMeetingApp.getInstance().setKickoutInfo(nReason); // 这一行
            if (VPWebLoginMgr.getInstance().m_b3rdAppCall) {
                iMeetingApp.getInstance().alertWithExit(iMeetingApp.getInstance().m_strLastExitReason, this);
                return;
            }
            onExit();
        }
    }

关于 kickout(1) 的调用,仅在 vizpower/imeeting/MeetingMgr.java 中找到一处:

    public void onSendUserMessage(ByteBuffer Received) {
        SendUserMessagePDU PDU = new SendUserMessagePDU();
        PDU.decode(Received);
        for (Map.Entry<String, String> entry : PDU.PropMap.entrySet()) {
            String strKey = entry.getKey();
            if (strKey.compareToIgnoreCase(SendUserMessagePDU.CMDKICKOUT) == 0) {
                iMeetingApp.getInstance().kickout(1); // 这一行
                return;
            } else if (strKey.compareToIgnoreCase(SendUserMessagePDU.CMDASSIST_RESPONSE) == 0) {
                RemoteControlPadMgr.getInstance().onHostNotify(entry.getValue());
                return;
            }
        }
    }

[Feature Request] 关于自动签到

vizpower.imeeting.viewcontroller.RollcallConfirmViewController 中,有一个 onBtnClickRollcallConfirm(),看起来非常像实现签到的代码:

    /* access modifiers changed from: private */
    public void onBtnClickRollcallConfirm() {
        if (this.m_pRollcallTimeoutHandler != null) {
            this.m_pRollcallTimeoutHandler.removeCallbacks(this.m_pRollcallTimeoutRunnable);
        }
        long nowTime = (long) VPUtils.getTickCount();
        if (nowTime - this.m_nLastRollCallAnswerTime > 5000) {
            this.m_nLastRollCallAnswerTime = nowTime;
            ReplyNamingPDU pdu = new ReplyNamingPDU();
            pdu.dwUserID = MeetingMgr.myUserID();
            pdu.bTime = (byte) ((int) ((nowTime - this.m_nLastRollcallStartTime) / 1000));
            MeetingMgr.getInstance().m_Room.sendPDU2(pdu);
            VPLog.logI("");
            adjustUI(STATE_ROLLCALL_SUCCESS);
            if (this.m_pRollcallTimeoutHandler != null) {
                this.m_pRollcallTimeoutHandler.removeCallbacks(this.m_pRollcallTimeoutRunnable);
                this.m_pRollcallTimeoutHandler.postDelayed(this.m_pRollcallCloseRunnable, 1500);
            }
            MeetingMgr.getInstance().addVPActionData(VPActionDef.VP_ACTION_ROLLCALL_RES, 0);
            return;
        }
        VPLog.logW("rollcall(timeout) send too fast ignored.");
    }

如果能 hook 掉 vizpower.imeeting.RollCallMgrstartRollCall(),在末尾添加调用 onBtnClickRollcallConfirm() 或许就可以实现自动签到了:

    public void startRollCall() {
        if (!this.m_bCanCall) {
            VPLog.logI("!m_bCanCall");
            return;
        }
        RequestNamingPDU pdu = new RequestNamingPDU();
        pdu.dwUserID = MeetingMgr.myUserID();
        pdu.bTime = 20;
        MeetingMgr.getInstance().m_Room.sendPDU2(pdu);
        MeetingMgr.getInstance().addVPActionData(VPActionDef.VP_ACTION_ROLLCALL, 0);
    }

无奈 Anguei 太菜不会写,所以仍到这里来了 QωQ

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.