MCPcopy
hub / github.com/JaveleyQAQ/WeChatOpenDevTools-Python / writeStdString

Function writeStdString

scripts/hook.js:29–47  ·  view source on GitHub ↗
(s, content)

Source from the content-addressed store, hash-verified

27 }
28}
29function writeStdString(s, content) {
30 var flag = s.add(23).readU8()
31 if (flag == 0x80) {
32 // 从堆中写入
33 var orisize = s.add(8).readUInt()
34 if (content.length > orisize) {
35 throw "must below orisize!"
36 }
37 s.readPointer().writeUtf8String(content)
38 s.add(8).writeUInt(content.length)
39 } else {
40 // 从栈中写入
41 if (content.length > 22) {
42 throw "max 23 for stack str"
43 }
44 s.writeUtf8String(content)
45 s.add(23).writeU8(content.length)
46 }
47}
48function sendMessage(msg) {
49 msg === null || undefined ? send(msg) : send("[+] 已还原完整F12")
50 // send("[+] 已还原完整F12")

Callers 1

onEnterFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected