/*** @author: xingjun.xyf* @contact: deathmemory@163.com* @file: replaceMemoryData.js* @time: 2021年8月26日 2:34 下午* @desc: 内存数据替换*/import {DMLog} from "../utils/dmlog";import {FCAnd} from "../utils/FCAnd";import {FCCommon} from "../utils/FCCommon";rpc.exports = {ms() {// 写入测试数据let am = Memory.alloc(0x60);DMLog.i('fc', 'alloc: ' + am);am.writeByteArray([0, 1, 2, 3, 4]);am.add(5).writeUtf8String("3C8F4F55D4B548E4EDBB1157EFAC3FC1");am.add(40).writeUtf8String("3C8F4F55D4B548E4EDBB1157EFAC3FC1");DMLog.i('fc', hexdump(am));// 替换数据FCAnd.replaceMemoryData(am, 0x60,FCCommon.str2hexstr("3C8F4F55D4B548E4EDBB1157EFAC3FC1"),FCCommon.str2hexArray("kkkkkkk"), false);// 验证数据DMLog.i('fc after', hexdump(am));let tgtarr = am.add(5).readByteArray(32);}}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。