yyyy关键点.txt 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  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. se::ScriptEngine::runScript(std::__ndk1::basic_string<char,std::__ndk1::char_traits<char>,std::__ndk1::allocator<char>> const&,se::Value *) 00569514
  5. 终结解决方案
  6. 0、配置的位置:window.HMFAppConfig = {
  7. 1、开启log !HMFAppConfig.isEnableConsoleLog
  8. 2、各种socket搜索正则 /\w+websocket"\)
  9. t[e[10] = "MsgID_ConnClose_Notice"] = 10;
  10. 3、横竖屏游戏类型
  11. t.isInHorizontalGameScene = function() {
  12. var e = cc.director.getScene().name;
  13. return e.startsWith("CowboyScene") || e.startsWith("HumanboyScene") || e.startsWith("PokerMasterScene") || e.startsWith("VideoCowboyScene") || "BlackjackPVP" == e;
  14. };
  15. t.isInVerticalGameScene = function() {
  16. var e = cc.director.getScene().name;
  17. return e.startsWith("gameTable") || "Game" == e || "JackfruitScene" == e || "multipleGame" == e;
  18. };
  19. 4、注册各种监听
  20. 230788,1: this.registerMessage(e, t, d.default.Enum.GameId.CowBoy);
  21. 231507,1: this.registerMessage(e, t, h.default.Enum.GameId.CowBoy);
  22. 242257,1: this.registerMessage(e, t, l.default.Enum.GameId.Data);
  23. 266456,1: this.registerMessage(e, t, u.default.Enum.GameId.Texas);
  24. 314946,1: this.registerMessage(e, t, a.default.Enum.GameId.HumanBoy);
  25. 335619,1: this.registerMessage(t, n, s.default.Enum.GameId.Jackfruit);
  26. 379954,1: this.registerMessage(e, t, s.default.Enum.GameId.PokerMaster);
  27. 381517,1: this.registerMessage(e, t, s.default.Enum.GameId.PokerMaster);
  28. 424396,1: this.registerMessage(e, t, s.default.Enum.GameId.VideoCowboy);
  29. 432702,1: this.registerMessage(e, t, d.default.Enum.GameId.World);
  30. 游戏配置可能
  31. window.WPGameData = {
  32. this.HOST_NAME = {
  33. 0: {
  34. ws: "ws",
  35. http: "http",
  36. pkf: [ "34.96.176.147:25501", "redeast.zongeng.com" ],
  37. pkfApi: [ "34.96.176.147:25501", "redeastapi.zongeng.com" ],
  38. config: [ "47.242.42.76:29016" ],
  39. pkfAssets: [ "47.242.42.76:22005" ]
  40. },
  41. 1: {
  42. ws: "ws",
  43. http: "http",
  44. pkf: [ "47.242.42.76:25501", "redeast.zongeng.com" ],
  45. pkfApi: [ "47.242.42.76:25501", "redeastapi.zongeng.com" ],
  46. config: [ "47.242.42.76:29016" ],
  47. pkfAssets: [ "47.242.42.76:22005" ]
  48. },
  49. 2: {
  50. ws: "wss",
  51. http: "https",
  52. pkf: [ "api.whjjzs.com", "api.loanflashing.com", "api.tunawest.net", "pokerfang.net", "pokerfang.com" ],
  53. 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" ],
  54. config: [ "21-server-conf.oss-cn-hongkong.aliyuncs.com" ],
  55. pkfAssets: [ "web.jinhuofeng.xyz" ]
  56. }
  57. };
  58. //各种log
  59. HMFUtils.clog = function
  60. HMFUtils.log = function(e)
  61. HMFAppSetting.showLog
  62. cc.log
  63. cc.vv.ConsoleLog = {
  64. console.log error warm
  65. window.HMFRequest = cc.Class({
  66. window.HMFHTTPClient = {
  67. //不知道是啥的日志
  68. BJPVPConsoleLog =
  69. //网络请求
  70. var o = n.gate_server;
  71. 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);
  72. this.wSocket.binaryType = "arraybuffer";
  73. this._send = function
  74. this.Send = this._send;
  75. sendByPromise: function(e) {
  76. e.prototype.send = function(e) {
  77. e.prototype.send = function(e) {
  78. if (!this.wSocket) return !1;
  79. if (this.wSocket.readyState == WebSocket.OPEN) {
  80. this.wSocket.send(e);
  81. this.u32seq += 1;
  82. return !0;
  83. }
  84. return !1;
  85. };
  86. ----------消息分发流程
  87. at e._fetchInfo (assets/main/index.jsc:360797:31)
  88. at e.fetchInfo (assets/main/index.jsc:360789:26)
  89. at t.decodePB (assets/main/index.jsc:366437:35)
  90. at t.MiniGamesListResponse (assets/main/index.jsc:434734:30)
  91. at e.onmessage (assets/main/index.jsc:366704:77)
  92. at e._fetchInfo (assets/main/index.jsc:360797:31)
  93. at e.fetchInfo (assets/main/index.jsc:360789:26)
  94. at t.decodePB (assets/main/index.jsc:366437:35)
  95. at t.responseHeartBeat (assets/main/index.jsc:433004:30)
  96. at e.onmessage (assets/main/index.jsc:366704:77)
  97. //登陆相关
  98. HMFHTTPClient.phoneNumLogin = function(e) {
  99. //UI?
  100. 输入框的string
  101. password: this.setNewPassWordInputPass.string,
  102. passwordRe: this.setNewPassWordConfirmPass.string
  103. ====>>>>鲨鱼大师游戏
  104. t.prototype.OnGameRoundEndNotify = function() {
  105. console.log("====>>>>鲨鱼大师游戏结束,开始初始化");
  106. this.hideKaiPaiSprite();
  107. this.playJieSuan();
  108. this.playPointAni();
  109. w.default.getVideoCowboyRoom().showTheNewestTrend = !1;
  110. this.resetLeftTimer();
  111. this.showHandCardsAnim();
  112. this._openCardLayer.updateCardType();
  113. this._openCardLayer.updateWinCards();
  114. };
  115. 不知道有什么差别,一个PokerMasterBaseSocket 一个PokerMasterHallSocket
  116. //解析网络请求
  117. t.prototype._parseNetMsg = function(e, t, n) {
  118. console.log(a);
  119. console.log(t);
  120. console.log(e);
  121. console.log(r);
  122. var o = this.decodePB(e, t);
  123. console.log("" + o);
  124. console.log("pokermaster_proto-receive-" + n + "-" + e + " = " + o);
  125. return o;
  126. };
  127. //解析各种协议
  128. t.prototype._parseNetMsg = function(e, t, n) {
  129. console.log(JSON.stringify(a));
  130. console.log(JSON.stringify(t));
  131. console.log(e);
  132. console.log(JSON.stringify(r));
  133. var o = this.decodePB(e, t);
  134. console.log("" + JSON.stringify(o);
  135. console.log("pokermaster_proto-receive-" + n + "-" + e + " = " + o);
  136. return o;
  137. };
  138. //根据 类型解码pb 取值(BetNotify、MergeAutoBetNotify)
  139. t.prototype.decodePB =
  140. //全局处理逻辑和websocket回调执行逻辑的地方
  141. e.prototype._fetchInfo
  142. -----------------------------------------------------------------
  143. -------------------重新定义console.log方法,支持长打印-------------
  144. const originalConsoleLog = console.log;
  145. function isHighSurrogate(codeUnit) {
  146. return codeUnit >= 0xD800 && codeUnit <= 0xDBFF;
  147. }
  148. function isLowSurrogate(codeUnit) {
  149. return codeUnit >= 0xDC00 && codeUnit <= 0xDFFF;
  150. }
  151. function splitAndPrintString(str, maxSize) {
  152. let strLength = str.length;
  153. for (let i = 0; i < strLength; i += maxSize) {
  154. let end = i + maxSize;
  155. // 确保不要在代理对中间拆分
  156. if (end < str.length && isHighSurrogate(str.charCodeAt(end - 1)) && isLowSurrogate(str.charCodeAt(end))) {
  157. end++;
  158. }
  159. if (strLength > maxSize) {//超过1页
  160. if (i === 0) { // 第一段
  161. originalConsoleLog(str.slice(i, end), "__>>__");
  162. } else if (end >= strLength) { // 最后一段
  163. originalConsoleLog("__<<__", str.slice(i, end));
  164. } else { // 中间的段
  165. originalConsoleLog("__<<__", str.slice(i, end), "__>>__");
  166. }
  167. } else {
  168. originalConsoleLog(str.slice(i, end));
  169. }
  170. }
  171. }
  172. //重新定义console.log方法
  173. console.log = function (...args) {
  174. const maxChunkSize = 1000; // 设定最大字符数,可根据需要调整
  175. // 将所有参数转换为字符串并拼接
  176. const combinedString = args.map(arg => {
  177. if (typeof arg === 'object') {
  178. try {
  179. return JSON.stringify(arg);
  180. } catch (e) {
  181. return "啊啊啊啊啊,解析失败了" + e.message;
  182. }
  183. } else {
  184. return String(arg);
  185. }
  186. }).join(' ');
  187. // 分段打印处理过的字符串
  188. splitAndPrintString(combinedString, maxChunkSize);
  189. };
  190. function printStack(){
  191. const stack = new Error().stack;
  192. console.log("报错堆栈:",stack);
  193. }
  194. -----------------------------------------------------------------
  195. -----------------------------------------------------------------
  196. -----------德州扑克-----------------
  197. 服务器关闭通知 ServerCloseNotify
  198. suit花色 0方片 1梅花 2红桃 3黑桃
  199. number牌 0=2 1=3 10=8 J=9 Q=10 K=11 A=12
  200. -----------德州扑克-----------------
  201. 11:30:43.871 D JS: 调用堆栈: Error
  202. at printStack (assets/main/index.jsc:2:19)
  203. at Object.window.__require.RoomManager.../../../../scripts/common/CowboyUtils (assets/main/index.jsc:399269:9)
  204. at i (assets/main/index.jsc:362:21)
  205. at assets/main/index.jsc:363:24
  206. at Object.window.__require.ActivityBase.../../../../../../pkw/Script/common/net/RoomManager (assets/main/index.jsc:168554:17)
  207. at i (assets/main/index.jsc:362:21)
  208. at assets/main/index.jsc:363:24
  209. at Object.window.__require.Activity1../ActivityBase (assets/main/index.jsc:168027:17)
  210. at i (assets/main/index.jsc:362:21)
  211. at assets/main/index.jsc:363:24
  212. ===================================================================================================
  213. const wsUrl = 'ws://192.168.137.1:9999';
  214. let lws;
  215. let attempt = 1;
  216. function connectWebSocket() {
  217. lws = new WebSocket(wsUrl);
  218. lws.onopen = function() {
  219. console.log("====>>>>ws 连接到服务器了");
  220. // Reset the attempt counter on successful connection
  221. attempt = 1;
  222. lws.send('你好,我来自游戏端');
  223. };
  224. lws.onmessage = function(event) {
  225. console.log("====>>>>ws 收到数据:", event.data);
  226. };
  227. lws.onerror = function(error) {
  228. console.log("====>>>>ws error:", error);
  229. };
  230. lws.onclose = function(event) {
  231. console.log("====>>>>ws 连接关闭:", event);
  232. // Automatic reconnection
  233. let time = generateInterval(attempt);
  234. setTimeout(function() {
  235. console.log(`====>>>>ws Trying to reconnect... (attempt: ${attempt})`);
  236. attempt++;
  237. connectWebSocket();
  238. }, time);
  239. };
  240. }
  241. function generateInterval(k) {
  242. // Generate reconnection time interval
  243. // This uses an exponential back-off strategy with "decorrelated jitter",
  244. // for details see: https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/
  245. let maxInterval = (Math.pow(2, k) - 1) * 1000;
  246. if (maxInterval > 30*1000) { // If the generated interval is greater than 30 seconds, cap it
  247. maxInterval = 30*1000;
  248. }
  249. // return a random time in milliseconds between 0 and the maxInterval
  250. return Math.random() * maxInterval;
  251. }
  252. // Initial connection
  253. connectWebSocket();
  254. //扑克大师界面的按钮
  255. Received message: PokerMasterScene/panel_bottom/panel_self/btn_recharge
  256. Received message: PokerMasterScene/panel_bottom/panel_self/btn_recharge/img
  257. Received message: PokerMasterScene/panel_bottom/panel_bet_btn/btn_bet_0
  258. Received message: PokerMasterScene/panel_bottom/panel_bet_btn/btn_bet_1
  259. Received message: PokerMasterScene/panel_bottom/panel_bet_btn/btn_bet_2
  260. Received message: PokerMasterScene/panel_bottom/panel_bet_btn/btn_bet_3
  261. Received message: PokerMasterScene/panel_bottom/panel_bet_btn/btn_bet_4
  262. Received message: PokerMasterScene/panel_bottom/panel_bet_btn/btn_bet_auto
  263. Received message: PokerMasterScene/panel_bottom/panel_bet_btn/btn_bet_clean
  264. Received message: PokerMasterScene/panel_bottom/panel_bet_btn/btn_redpacket_grab
  265. Received message: PokerMasterScene/panel_bottom/btn_playerlist
  266. Received message: PokerMasterScene/btn_menu
  267. Received message: PokerMasterScene/btn_review
  268. Received message: PokerMasterScene/HumanboyAdvancedAuto/panel_select/panel_block/btn_cancel
  269. Received message: CustomerIMView/HintContainer
  270. Received message: CustomerIMView/CustomerIMContentView/New Sprite(Splash)
  271. Received message: CustomerIMView/CustomerIMContentView/topView/closeButton
  272. Received message: CustomerIMView/CustomerIMContentView/inputContainer/uploadImageButton
  273. Received message: CustomerIMView/CustomerIMContentView/inputContainer/submitButton
  274. Received message: CustomerIMView/CustomerIMContentView/inputContainer/submitButton/background
  275. Received message: CustomerIMView/CustomerIMContentView/photoBox/background/btnClose
  276. Received message: CustomerIMView/CustomerChatButton
  277. Received message: CustomerIMView/CustomerChatButton/button_CustomerService
  278. Received message: Layer/groupBack_button
  279. Received message: Layer/gold_panel/gold_btn
  280. Received message: Layer/gold_button
  281. Received message: Layer/gray_button
  282. Received message: Layer/cancel_button
  283. Received message: Layer/sure_button
  284. Received message: Layer/PushNotice_panel/close_button
  285. Received message: PokerMasterScene/panel_bottom/panel_self/btn_recharge
  286. Received message: PokerMasterScene/panel_bottom/panel_self/btn_recharge/img
  287. Received message: PokerMasterScene/panel_bottom/panel_bet_btn/btn_bet_0
  288. Received message: PokerMasterScene/panel_bottom/panel_bet_btn/btn_bet_1
  289. Received message: PokerMasterScene/panel_bottom/panel_bet_btn/btn_bet_2
  290. Received message: PokerMasterScene/panel_bottom/panel_bet_btn/btn_bet_3
  291. Received message: PokerMasterScene/panel_bottom/panel_bet_btn/btn_bet_4
  292. Received message: PokerMasterScene/panel_bottom/panel_bet_btn/btn_bet_auto
  293. Received message: PokerMasterScene/panel_bottom/panel_bet_btn/btn_bet_clean
  294. Received message: PokerMasterScene/panel_bottom/panel_bet_btn/btn_redpacket_grab
  295. Received message: PokerMasterScene/panel_bottom/btn_playerlist
  296. Received message: PokerMasterScene/btn_menu
  297. Received message: PokerMasterScene/btn_review
  298. Received message: PokerMasterScene/HumanboyAdvancedAuto/panel_select/panel_block/btn_cancel
  299. Received message: PokerMasterScene/HumanboyMenu/img_menu_bg/btn_exchangeMoney
  300. Received message: PokerMasterScene/HumanboyMenu/img_menu_bg/btn_rule
  301. Received message: PokerMasterScene/HumanboyMenu/img_menu_bg/btn_sound_setting
  302. Received message: PokerMasterScene/HumanboyMenu/img_menu_bg/btn_advanced_setting
  303. Received message: PokerMasterScene/HumanboyMenu/img_menu_bg/btn_exit
  304. Received message: PokerMasterScene/HumanboyMenu/img_menu_bg/MoneyNode/icon_add
  305. Received message: CustomerIMView/HintContainer
  306. Received message: CustomerIMView/CustomerIMContentView/New Sprite(Splash)
  307. Received message: CustomerIMView/CustomerIMContentView/topView/closeButton
  308. Received message: CustomerIMView/CustomerIMContentView/inputContainer/uploadImageButton
  309. Received message: CustomerIMView/CustomerIMContentView/inputContainer/submitButton
  310. Received message: CustomerIMView/CustomerIMContentView/inputContainer/submitButton/background
  311. Received message: CustomerIMView/CustomerIMContentView/photoBox/background/btnClose
  312. Received message: CustomerIMView/CustomerChatButton
  313. Received message: CustomerIMView/CustomerChatButton/button_CustomerService
  314. Received message: Layer/groupBack_button
  315. Received message: Layer/gold_panel/gold_btn
  316. Received message: Layer/gold_button
  317. Received message: Layer/gray_button
  318. Received message: Layer/cancel_button
  319. Received message: Layer/sure_button
  320. Received message: Layer/PushNotice_panel/close_button