123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423 |
- 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'
- se::ScriptEngine::runScript(std::__ndk1::basic_string<char,std::__ndk1::char_traits<char>,std::__ndk1::allocator<char>> const&,se::Value *) 00569514
- 终结解决方案
- 0、配置的位置:window.HMFAppConfig = {
- 1、开启log !HMFAppConfig.isEnableConsoleLog
- 2、各种socket搜索正则 /\w+websocket"\)
- t[e[10] = "MsgID_ConnClose_Notice"] = 10;
- 3、横竖屏游戏类型
- t.isInHorizontalGameScene = function() {
- var e = cc.director.getScene().name;
- return e.startsWith("CowboyScene") || e.startsWith("HumanboyScene") || e.startsWith("PokerMasterScene") || e.startsWith("VideoCowboyScene") || "BlackjackPVP" == e;
- };
- t.isInVerticalGameScene = function() {
- var e = cc.director.getScene().name;
- return e.startsWith("gameTable") || "Game" == e || "JackfruitScene" == e || "multipleGame" == e;
- };
- 4、注册各种监听
- 230788,1: this.registerMessage(e, t, d.default.Enum.GameId.CowBoy);
- 231507,1: this.registerMessage(e, t, h.default.Enum.GameId.CowBoy);
- 242257,1: this.registerMessage(e, t, l.default.Enum.GameId.Data);
- 266456,1: this.registerMessage(e, t, u.default.Enum.GameId.Texas);
- 314946,1: this.registerMessage(e, t, a.default.Enum.GameId.HumanBoy);
- 335619,1: this.registerMessage(t, n, s.default.Enum.GameId.Jackfruit);
- 379954,1: this.registerMessage(e, t, s.default.Enum.GameId.PokerMaster);
- 381517,1: this.registerMessage(e, t, s.default.Enum.GameId.PokerMaster);
- 424396,1: this.registerMessage(e, t, s.default.Enum.GameId.VideoCowboy);
- 432702,1: this.registerMessage(e, t, d.default.Enum.GameId.World);
- 游戏配置可能
- window.WPGameData = {
- this.HOST_NAME = {
- 0: {
- ws: "ws",
- http: "http",
- pkf: [ "34.96.176.147:25501", "redeast.zongeng.com" ],
- pkfApi: [ "34.96.176.147:25501", "redeastapi.zongeng.com" ],
- config: [ "47.242.42.76:29016" ],
- pkfAssets: [ "47.242.42.76:22005" ]
- },
- 1: {
- ws: "ws",
- http: "http",
- pkf: [ "47.242.42.76:25501", "redeast.zongeng.com" ],
- pkfApi: [ "47.242.42.76:25501", "redeastapi.zongeng.com" ],
- config: [ "47.242.42.76:29016" ],
- pkfAssets: [ "47.242.42.76:22005" ]
- },
- 2: {
- ws: "wss",
- http: "https",
- pkf: [ "api.whjjzs.com", "api.loanflashing.com", "api.tunawest.net", "pokerfang.net", "pokerfang.com" ],
- 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" ],
- config: [ "21-server-conf.oss-cn-hongkong.aliyuncs.com" ],
- pkfAssets: [ "web.jinhuofeng.xyz" ]
- }
- };
- //各种log
- HMFUtils.clog = function
- HMFUtils.log = function(e)
- HMFAppSetting.showLog
- cc.log
- cc.vv.ConsoleLog = {
- console.log error warm
- window.HMFRequest = cc.Class({
- window.HMFHTTPClient = {
- //不知道是啥的日志
- BJPVPConsoleLog =
- //网络请求
- var o = n.gate_server;
- 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);
- this.wSocket.binaryType = "arraybuffer";
- this._send = function
- this.Send = this._send;
- sendByPromise: function(e) {
- e.prototype.send = function(e) {
- e.prototype.send = function(e) {
- if (!this.wSocket) return !1;
- if (this.wSocket.readyState == WebSocket.OPEN) {
- this.wSocket.send(e);
- this.u32seq += 1;
- return !0;
- }
- return !1;
- };
- ----------消息分发流程
- at e._fetchInfo (assets/main/index.jsc:360797:31)
- at e.fetchInfo (assets/main/index.jsc:360789:26)
- at t.decodePB (assets/main/index.jsc:366437:35)
- at t.MiniGamesListResponse (assets/main/index.jsc:434734:30)
- at e.onmessage (assets/main/index.jsc:366704:77)
- at e._fetchInfo (assets/main/index.jsc:360797:31)
- at e.fetchInfo (assets/main/index.jsc:360789:26)
- at t.decodePB (assets/main/index.jsc:366437:35)
- at t.responseHeartBeat (assets/main/index.jsc:433004:30)
- at e.onmessage (assets/main/index.jsc:366704:77)
- //登陆相关
- HMFHTTPClient.phoneNumLogin = function(e) {
- //UI?
- 输入框的string
- password: this.setNewPassWordInputPass.string,
- passwordRe: this.setNewPassWordConfirmPass.string
- ====>>>>鲨鱼大师游戏
- t.prototype.OnGameRoundEndNotify = function() {
- console.log("====>>>>鲨鱼大师游戏结束,开始初始化");
- this.hideKaiPaiSprite();
- this.playJieSuan();
- this.playPointAni();
- w.default.getVideoCowboyRoom().showTheNewestTrend = !1;
- this.resetLeftTimer();
- this.showHandCardsAnim();
- this._openCardLayer.updateCardType();
- this._openCardLayer.updateWinCards();
- };
- 不知道有什么差别,一个PokerMasterBaseSocket 一个PokerMasterHallSocket
- //解析网络请求
- t.prototype._parseNetMsg = function(e, t, n) {
- console.log(a);
- console.log(t);
- console.log(e);
- console.log(r);
- 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);
- };
- function printStack(){
- const stack = new Error().stack;
- console.log("报错堆栈:",stack);
- }
- -----------------------------------------------------------------
- -----------------------------------------------------------------
- -----------德州扑克-----------------
- 服务器关闭通知 ServerCloseNotify
- suit花色 0方片 1梅花 2红桃 3黑桃
- number牌 0=2 1=3 10=8 J=9 Q=10 K=11 A=12
- -----------德州扑克-----------------
- 11:30:43.871 D JS: 调用堆栈: Error
- at printStack (assets/main/index.jsc:2:19)
- at Object.window.__require.RoomManager.../../../../scripts/common/CowboyUtils (assets/main/index.jsc:399269:9)
- at i (assets/main/index.jsc:362:21)
- at assets/main/index.jsc:363:24
- at Object.window.__require.ActivityBase.../../../../../../pkw/Script/common/net/RoomManager (assets/main/index.jsc:168554:17)
- at i (assets/main/index.jsc:362:21)
- at assets/main/index.jsc:363:24
- at Object.window.__require.Activity1../ActivityBase (assets/main/index.jsc:168027:17)
- at i (assets/main/index.jsc:362:21)
- at assets/main/index.jsc:363:24
- ===================================================================================================
- const wsUrl = 'ws://192.168.137.1:9999';
- let lws;
- let attempt = 1;
- function connectWebSocket() {
- lws = new WebSocket(wsUrl);
- lws.onopen = function() {
- console.log("====>>>>ws 连接到服务器了");
- // Reset the attempt counter on successful connection
- attempt = 1;
- lws.send('你好,我来自游戏端');
- };
- lws.onmessage = function(event) {
- console.log("====>>>>ws 收到数据:", event.data);
- };
- lws.onerror = function(error) {
- console.log("====>>>>ws error:", error);
- };
- lws.onclose = function(event) {
- console.log("====>>>>ws 连接关闭:", event);
- // Automatic reconnection
- let time = generateInterval(attempt);
- setTimeout(function() {
- console.log(`====>>>>ws Trying to reconnect... (attempt: ${attempt})`);
- attempt++;
- connectWebSocket();
- }, time);
- };
- }
- function generateInterval(k) {
- // Generate reconnection time interval
- // This uses an exponential back-off strategy with "decorrelated jitter",
- // for details see: https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/
- let maxInterval = (Math.pow(2, k) - 1) * 1000;
- if (maxInterval > 30*1000) { // If the generated interval is greater than 30 seconds, cap it
- maxInterval = 30*1000;
- }
- // return a random time in milliseconds between 0 and the maxInterval
- return Math.random() * maxInterval;
- }
- // Initial connection
- connectWebSocket();
- //扑克大师界面的按钮
- Received message: PokerMasterScene/panel_bottom/panel_self/btn_recharge
- Received message: PokerMasterScene/panel_bottom/panel_self/btn_recharge/img
- Received message: PokerMasterScene/panel_bottom/panel_bet_btn/btn_bet_0
- Received message: PokerMasterScene/panel_bottom/panel_bet_btn/btn_bet_1
- Received message: PokerMasterScene/panel_bottom/panel_bet_btn/btn_bet_2
- Received message: PokerMasterScene/panel_bottom/panel_bet_btn/btn_bet_3
- Received message: PokerMasterScene/panel_bottom/panel_bet_btn/btn_bet_4
- Received message: PokerMasterScene/panel_bottom/panel_bet_btn/btn_bet_auto
- Received message: PokerMasterScene/panel_bottom/panel_bet_btn/btn_bet_clean
- Received message: PokerMasterScene/panel_bottom/panel_bet_btn/btn_redpacket_grab
- Received message: PokerMasterScene/panel_bottom/btn_playerlist
- Received message: PokerMasterScene/btn_menu
- Received message: PokerMasterScene/btn_review
- Received message: PokerMasterScene/HumanboyAdvancedAuto/panel_select/panel_block/btn_cancel
- Received message: CustomerIMView/HintContainer
- Received message: CustomerIMView/CustomerIMContentView/New Sprite(Splash)
- Received message: CustomerIMView/CustomerIMContentView/topView/closeButton
- Received message: CustomerIMView/CustomerIMContentView/inputContainer/uploadImageButton
- Received message: CustomerIMView/CustomerIMContentView/inputContainer/submitButton
- Received message: CustomerIMView/CustomerIMContentView/inputContainer/submitButton/background
- Received message: CustomerIMView/CustomerIMContentView/photoBox/background/btnClose
- Received message: CustomerIMView/CustomerChatButton
- Received message: CustomerIMView/CustomerChatButton/button_CustomerService
- Received message: Layer/groupBack_button
- Received message: Layer/gold_panel/gold_btn
- Received message: Layer/gold_button
- Received message: Layer/gray_button
- Received message: Layer/cancel_button
- Received message: Layer/sure_button
- Received message: Layer/PushNotice_panel/close_button
- Received message: PokerMasterScene/panel_bottom/panel_self/btn_recharge
- Received message: PokerMasterScene/panel_bottom/panel_self/btn_recharge/img
- Received message: PokerMasterScene/panel_bottom/panel_bet_btn/btn_bet_0
- Received message: PokerMasterScene/panel_bottom/panel_bet_btn/btn_bet_1
- Received message: PokerMasterScene/panel_bottom/panel_bet_btn/btn_bet_2
- Received message: PokerMasterScene/panel_bottom/panel_bet_btn/btn_bet_3
- Received message: PokerMasterScene/panel_bottom/panel_bet_btn/btn_bet_4
- Received message: PokerMasterScene/panel_bottom/panel_bet_btn/btn_bet_auto
- Received message: PokerMasterScene/panel_bottom/panel_bet_btn/btn_bet_clean
- Received message: PokerMasterScene/panel_bottom/panel_bet_btn/btn_redpacket_grab
- Received message: PokerMasterScene/panel_bottom/btn_playerlist
- Received message: PokerMasterScene/btn_menu
- Received message: PokerMasterScene/btn_review
- Received message: PokerMasterScene/HumanboyAdvancedAuto/panel_select/panel_block/btn_cancel
- Received message: PokerMasterScene/HumanboyMenu/img_menu_bg/btn_exchangeMoney
- Received message: PokerMasterScene/HumanboyMenu/img_menu_bg/btn_rule
- Received message: PokerMasterScene/HumanboyMenu/img_menu_bg/btn_sound_setting
- Received message: PokerMasterScene/HumanboyMenu/img_menu_bg/btn_advanced_setting
- Received message: PokerMasterScene/HumanboyMenu/img_menu_bg/btn_exit
- Received message: PokerMasterScene/HumanboyMenu/img_menu_bg/MoneyNode/icon_add
- Received message: CustomerIMView/HintContainer
- Received message: CustomerIMView/CustomerIMContentView/New Sprite(Splash)
- Received message: CustomerIMView/CustomerIMContentView/topView/closeButton
- Received message: CustomerIMView/CustomerIMContentView/inputContainer/uploadImageButton
- Received message: CustomerIMView/CustomerIMContentView/inputContainer/submitButton
- Received message: CustomerIMView/CustomerIMContentView/inputContainer/submitButton/background
- Received message: CustomerIMView/CustomerIMContentView/photoBox/background/btnClose
- Received message: CustomerIMView/CustomerChatButton
- Received message: CustomerIMView/CustomerChatButton/button_CustomerService
- Received message: Layer/groupBack_button
- Received message: Layer/gold_panel/gold_btn
- Received message: Layer/gold_button
- Received message: Layer/gray_button
- Received message: Layer/cancel_button
- Received message: Layer/sure_button
- Received message: Layer/PushNotice_panel/close_button
|