MCPcopy Create free account
hub / github.com/evi0s/WMPFDebugger / hookOnLoadScene

Function hookOnLoadScene

frida/hook.js:37–80  ·  view source on GitHub ↗
(a1, sceneOffsets)

Source from the content-addressed store, hash-verified

35 send("[patch] CDP filter patched");
36 }
37 } catch (e) {
38 send(`[patch] CDP filter error: ${e}`);
39 }
40 }
41 });
42};
43
44const hookOnLoadScene = (a1, sceneOffsets) => {
45 const miniappConfigPtr = a1
46 .add(sceneOffsets[0])
47 .readPointer()
48 .add(sceneOffsets[1])
49 .readPointer();
50 const miniappScenePtr = miniappConfigPtr
51 .add(sceneOffsets[2])
52 .readPointer()
53 .add(sceneOffsets[3])
54 .readPointer()
55 .add(sceneOffsets[4])
56 .readPointer()
57 .add(sceneOffsets[5]);
58 send(`[hook] scene: ${miniappScenePtr.readInt()}`);
59
60 // 1000: from issue #83 <-- will crash the process
61 // 1007: from issue #80
62 // 1008: from issue #53
63 // 1027: from issue #78
64 // 1035: from issue #78
65 // 1053: from issue #25
66 // 1074: from issue #32
67 // 1145: from search
68 // 1178: from phone (issue #117)
69 // 1256: from recent
70 // 1260: from frequently used
71 // 1302: from services
72 // 1308: minigame?
73 const sceneNumberArray = [
74 1005, 1007, 1008, 1027, 1035, 1053, 1074, 1145, 1178, 1256, 1260, 1302,
75 1308,
76 ];
77 if (!sceneNumberArray.includes(miniappScenePtr.readInt())) {
78 return;
79 }
80 send("[hook] hook scene condition -> 1101");
81 miniappScenePtr.writeInt(1101);
82
83 // TODO: customize debugging endpoint

Callers 1

onEnterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected