yyyy关键点.txt 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. adb push D:\ICODE_HOME\HookCli\yyyy_js\assets\main\index.jsc /data/local/tmp/index.jsc
  2. 日志过滤:
  3. 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'
  4. 终结解决方案
  5. 0、配置的位置:window.HMFAppConfig = {
  6. 1、开启log !HMFAppConfig.isEnableConsoleLog
  7. 2、各种socket搜索正则 /\w+websocket"\)
  8. t[e[10] = "MsgID_ConnClose_Notice"] = 10;
  9. 3、横竖屏游戏类型
  10. t.isInHorizontalGameScene = function() {
  11. var e = cc.director.getScene().name;
  12. return e.startsWith("CowboyScene") || e.startsWith("HumanboyScene") || e.startsWith("PokerMasterScene") || e.startsWith("VideoCowboyScene") || "BlackjackPVP" == e;
  13. };
  14. t.isInVerticalGameScene = function() {
  15. var e = cc.director.getScene().name;
  16. return e.startsWith("gameTable") || "Game" == e || "JackfruitScene" == e || "multipleGame" == e;
  17. };
  18. 4、注册各种监听
  19. 230788,1: this.registerMessage(e, t, d.default.Enum.GameId.CowBoy);
  20. 231507,1: this.registerMessage(e, t, h.default.Enum.GameId.CowBoy);
  21. 242257,1: this.registerMessage(e, t, l.default.Enum.GameId.Data);
  22. 266456,1: this.registerMessage(e, t, u.default.Enum.GameId.Texas);
  23. 314946,1: this.registerMessage(e, t, a.default.Enum.GameId.HumanBoy);
  24. 335619,1: this.registerMessage(t, n, s.default.Enum.GameId.Jackfruit);
  25. 379954,1: this.registerMessage(e, t, s.default.Enum.GameId.PokerMaster);
  26. 381517,1: this.registerMessage(e, t, s.default.Enum.GameId.PokerMaster);
  27. 424396,1: this.registerMessage(e, t, s.default.Enum.GameId.VideoCowboy);
  28. 432702,1: this.registerMessage(e, t, d.default.Enum.GameId.World);
  29. 游戏配置可能
  30. window.WPGameData = {
  31. this.HOST_NAME = {
  32. 0: {
  33. ws: "ws",
  34. http: "http",
  35. pkf: [ "34.96.176.147:25501", "redeast.zongeng.com" ],
  36. pkfApi: [ "34.96.176.147:25501", "redeastapi.zongeng.com" ],
  37. config: [ "47.242.42.76:29016" ],
  38. pkfAssets: [ "47.242.42.76:22005" ]
  39. },
  40. 1: {
  41. ws: "ws",
  42. http: "http",
  43. pkf: [ "47.242.42.76:25501", "redeast.zongeng.com" ],
  44. pkfApi: [ "47.242.42.76:25501", "redeastapi.zongeng.com" ],
  45. config: [ "47.242.42.76:29016" ],
  46. pkfAssets: [ "47.242.42.76:22005" ]
  47. },
  48. 2: {
  49. ws: "wss",
  50. http: "https",
  51. pkf: [ "api.whjjzs.com", "api.loanflashing.com", "api.tunawest.net", "pokerfang.net", "pokerfang.com" ],
  52. pkfApi: [ "api.whjjzs.com", "api.loanflashing.com", "api.tunawest.net", "api.mkters.com", "api.blflnm.com", "api.zongeng.com", "api.yufvlav.cn", "api.jnfeeder.top" ],
  53. config: [ "21-server-conf.oss-cn-hongkong.aliyuncs.com" ],
  54. pkfAssets: [ "web.jinhuofeng.xyz" ]
  55. }
  56. };
  57. //各种log
  58. HMFUtils.clog = function
  59. HMFUtils.log = function(e)
  60. HMFAppSetting.showLog
  61. cc.log
  62. cc.vv.ConsoleLog = {
  63. console.log error warm
  64. window.HMFRequest = cc.Class({
  65. window.HMFHTTPClient = {
  66. //不知道是啥的日志
  67. BJPVPConsoleLog =
  68. //网络请求
  69. var o = n.gate_server;
  70. 0 === o.indexOf("wss") && cc.sys.isNative ? this.wSocket = new WebSocket(o, "chat", cc.url.raw("resources/ca/cacert.pem")) : this.wSocket = new WebSocket(o);
  71. this.wSocket.binaryType = "arraybuffer";
  72. this._send = function
  73. this.Send = this._send;
  74. sendByPromise: function(e) {
  75. e.prototype.send = function(e) {
  76. e.prototype.send = function(e) {
  77. if (!this.wSocket) return !1;
  78. if (this.wSocket.readyState == WebSocket.OPEN) {
  79. this.wSocket.send(e);
  80. this.u32seq += 1;
  81. return !0;
  82. }
  83. return !1;
  84. };
  85. //登陆相关
  86. HMFHTTPClient.phoneNumLogin = function(e) {
  87. //UI?
  88. 输入框的string
  89. password: this.setNewPassWordInputPass.string,
  90. passwordRe: this.setNewPassWordConfirmPass.string
  91. ====>>>>鲨鱼大师游戏
  92. t.prototype.OnGameRoundEndNotify = function() {
  93. console.log("====>>>>鲨鱼大师游戏结束,开始初始化");
  94. this.hideKaiPaiSprite();
  95. this.playJieSuan();
  96. this.playPointAni();
  97. w.default.getVideoCowboyRoom().showTheNewestTrend = !1;
  98. this.resetLeftTimer();
  99. this.showHandCardsAnim();
  100. this._openCardLayer.updateCardType();
  101. this._openCardLayer.updateWinCards();
  102. };
  103. 不知道有什么差别,一个PokerMasterBaseSocket 一个PokerMasterHallSocket
  104. //解析网络请求
  105. t.prototype._parseNetMsg = function(e, t, n) {
  106. console.log(a);
  107. console.log(t);
  108. console.log(e);
  109. console.log(r);
  110. var o = this.decodePB(e, t);
  111. console.log("" + o);
  112. console.log("pokermaster_proto-receive-" + n + "-" + e + " = " + o);
  113. return o;
  114. };
  115. //解析各种协议
  116. t.prototype._parseNetMsg = function(e, t, n) {
  117. console.log(JSON.stringify(a));
  118. console.log(JSON.stringify(t));
  119. console.log(e);
  120. console.log(JSON.stringify(r));
  121. var o = this.decodePB(e, t);
  122. console.log("" + JSON.stringify(o);
  123. console.log("pokermaster_proto-receive-" + n + "-" + e + " = " + o);
  124. return o;
  125. };
  126. //根据 类型解码pb 取值(BetNotify、MergeAutoBetNotify)
  127. t.prototype.decodePB =
  128. //全局处理逻辑和websocket回调执行逻辑的地方
  129. e.prototype._fetchInfo
  130. //重新定义console.log方法,支持长打印
  131. const originalConsoleLog = console.log;
  132. function isHighSurrogate(codeUnit) {
  133. return codeUnit >= 0xD800 && codeUnit <= 0xDBFF;
  134. }
  135. function isLowSurrogate(codeUnit) {
  136. return codeUnit >= 0xDC00 && codeUnit <= 0xDFFF;
  137. }
  138. function splitAndPrintString(str, maxSize) {
  139. let strLength = str.length;
  140. for (let i = 0; i < strLength; i += maxSize) {
  141. let end = i + maxSize;
  142. // 确保不要在代理对中间拆分
  143. if (end < str.length && isHighSurrogate(str.charCodeAt(end - 1)) && isLowSurrogate(str.charCodeAt(end))) {
  144. end++;
  145. }
  146. if(strLength > maxSize){//超过1页
  147. if (i === 0) { // 第一段
  148. originalConsoleLog(str.slice(i, end), "__>>__");
  149. } else if (end >= strLength) { // 最后一段
  150. originalConsoleLog("__<<__", str.slice(i, end));
  151. } else { // 中间的段
  152. originalConsoleLog("__<<__", str.slice(i, end), "__>>__");
  153. }
  154. }else{
  155. originalConsoleLog(str.slice(i, end));
  156. }
  157. }
  158. }