| 27 | } |
| 28 | } |
| 29 | function 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 | } |
| 48 | function sendMessage(msg) { |
| 49 | msg === null || undefined ? send(msg) : send("[+] 已还原完整F12") |
| 50 | // send("[+] 已还原完整F12") |