Browse Source

yyyy游戏的通信协议解析

Alex 1 year ago
parent
commit
2e37166cc7
2 changed files with 771548 additions and 771410 deletions
  1. 771467 771408
      yyyy_js/assets/main/index.jsc
  2. 81 2
      yyyy_js/yyyy关键点.txt

File diff suppressed because it is too large
+ 771467 - 771408
yyyy_js/assets/main/index.jsc


+ 81 - 2
yyyy_js/yyyy关键点.txt

@@ -1,4 +1,4 @@
-adb push D:\Project_Repostory\HookCli\yyyy_js\assets\main\index.jsc  /data/local/tmp/index.jsc
+adb push D:\ICODE_HOME\HookCli\yyyy_js\assets\main\index.jsc  /data/local/tmp/index.jsc
 
 日志过滤:
 package:com.rbigkic.yyydsj -message~:'(Fail to play)|世界|CertificateException|CertPathValidatorException|audio|JniHelper|resource|SSLHandshakeException|ResMgr|conscrypt|CertificateExpiredException' -tag~:'init haveGPS =|System.err' -message~:'Location|DeviceMgr'
@@ -150,4 +150,83 @@ var o = this.decodePB(e, t);
 console.log("" + o);
 console.log("pokermaster_proto-receive-" + n + "-" + e + " = " + o);
 return o;
-};
+};
+
+//解析各种协议
+t.prototype._parseNetMsg = function(e, t, n) {
+console.log(JSON.stringify(a));
+console.log(JSON.stringify(t));
+console.log(e);
+console.log(JSON.stringify(r));
+var o = this.decodePB(e, t);
+console.log("" + JSON.stringify(o);
+console.log("pokermaster_proto-receive-" + n + "-" + e + " = " + o);
+return o;
+};
+
+//根据 类型解码pb 取值(BetNotify、MergeAutoBetNotify)
+t.prototype.decodePB =
+
+
+//全局处理逻辑和websocket回调执行逻辑的地方
+
+ e.prototype._fetchInfo
+
+
+//重新定义console.log方法,支持长打印
+
+const originalConsoleLog = console.log;
+
+function isHighSurrogate(codeUnit) {
+    return codeUnit >= 0xD800 && codeUnit <= 0xDBFF;
+}
+
+function isLowSurrogate(codeUnit) {
+    return codeUnit >= 0xDC00 && codeUnit <= 0xDFFF;
+}
+
+function splitAndPrintString(str, maxSize) {
+    let strLength = str.length;
+    for (let i = 0; i < strLength; i += maxSize) {
+        let end = i + maxSize;
+
+        // 确保不要在代理对中间拆分
+        if (end < str.length && isHighSurrogate(str.charCodeAt(end - 1)) && isLowSurrogate(str.charCodeAt(end))) {
+            end++;
+        }
+
+        if (strLength > maxSize) {//超过1页
+            if (i === 0) { // 第一段
+                originalConsoleLog(str.slice(i, end), "__>>__");
+            } else if (end >= strLength) { // 最后一段
+                originalConsoleLog("__<<__", str.slice(i, end));
+            } else { // 中间的段
+                originalConsoleLog("__<<__", str.slice(i, end), "__>>__");
+            }
+        } else {
+            originalConsoleLog(str.slice(i, end));
+        }
+    }
+}
+
+//重新定义console.log方法
+console.log = function (...args) {
+    const maxChunkSize = 1000; // 设定最大字符数,可根据需要调整
+
+    // 将所有参数转换为字符串并拼接
+    const combinedString = args.map(arg => {
+        if (typeof arg === 'object') {
+            try {
+                return JSON.stringify(arg);
+            } catch (e) {
+                return "啊啊啊啊啊,解析失败了" + e.message;
+            }
+        } else {
+            return String(arg);
+        }
+    }).join(' ');
+
+    // 分段打印处理过的字符串
+    splitAndPrintString(combinedString, maxChunkSize);
+};
+