Open ghost opened 3 years ago
地址无效?解决了吗
Ive solved it.You can contact me on Skype.Skype: mrklintscherAm 09.12.2020 03:37 schrieb Tzeross notifications@github.com:
地址无效?解决了吗
—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.
[15:34:39 107] INFO [com.github.unidbg.linux.ARMSyscallHandler] (ARMSyscallHandler:1807) - faccessat dirfd=-100, pathname=/proc/17288/fd/3, oflags=0x0, mode=0 [15:34:39 132] INFO [com.github.unidbg.linux.ARMSyscallHandler] (ARMSyscallHandler:1025) - stat64 pathname=\data\data\com.cyjh.mobileanjian [15:34:39 135] INFO [com.github.unidbg.linux.ARMSyscallHandler] (ARMSyscallHandler:1025) - stat64 pathname=\data\data\com.touchsprite.android [15:34:39 137] INFO [com.github.unidbg.linux.ARMSyscallHandler] (ARMSyscallHandler:1025) - stat64 pathname=\data\data\net.aisence.Touchelper [15:34:39 138] INFO [com.github.unidbg.linux.ARMSyscallHandler] (ARMSyscallHandler:1025) - stat64 pathname=\dev\input\event0 [15:34:39 230] INFO [com.github.unidbg.linux.ARMSyscallHandler] (ARMSyscallHandler:1807) - faccessat dirfd=-100, pathname=/proc/17288/fd/3, oflags=0x0, mode=0 [15:34:39 238] INFO [com.github.unidbg.linux.ARMSyscallHandler] (ARMSyscallHandler:1862) - openat dirfd=-100, pathname=/sdcard/.Y3ps, oflags=0x0, mode=0 [15:34:39 265] WARN [com.github.unidbg.arm.AbstractARMEmulator] (AbstractARMEmulator$1:54) - memory failed: address=0x0, size=4, value=0x40259000 [15:34:39 266] WARN [com.github.unidbg.AbstractEmulator] (AbstractEmulator:355) - emulate RX@0x40021515[libcms.so]0x21515 exception sp=unicorn@0xbffff4d0, msg=Invalid memory write (UC_ERR_WRITE_UNMAPPED), offset=10ms 4294967295 unicorn.UnicornException: Invalid memory write (UC_ERR_WRITE_UNMAPPED) at unicorn.Unicorn.emu_start(Native Method) at com.github.unidbg.AbstractEmulator.emulate(AbstractEmulator.java:339) at com.github.unidbg.AbstractEmulator.eFunc(AbstractEmulator.java:437) at com.github.unidbg.arm.AbstractARMEmulator.eFunc(AbstractARMEmulator.java:196) at com.github.unidbg.Module.emulateFunction(Module.java:155) at com.github.unidbg.linux.LinuxModule.callFunction(LinuxModule.java:188) at com.sun.jna.Dy.deXLog(test.java:157) at com.sun.jna.Dy.main(test.java:61) Exception in thread "main" unicorn.UnicornException: Invalid memory read (UC_ERR_READ_UNMAPPED) at unicorn.Unicorn.mem_read(Native Method) at com.sun.jna.Dy.deXLog(test.java:171) at com.sun.jna.Dy.main(test.java:61)
Process finished with exit code 1
這是我的代碼:
private String deXLog(byte[] data){ MemoryBlock dataBlock = this.memory.malloc(data.length); dataBlock.getPointer().write(0L, data, 0, data.length); MemoryBlock enDataBlock = this.memory.malloc(4); MemoryBlock enSizeBlock= this.memory.malloc(4); Unicorn unicorn = this.emulator.getUnicorn(); //long ok = 136469L; Number[] numbers = this.module.callFunction(this.emulator, 136469L, new Object[] { dataBlock.getPointer(), Long.valueOf(data.length), enDataBlock.getPointer(), enSizeBlock.getPointer() } ); long result = numbers[0].longValue() & 0xFFFFFFFFL; System.out.println(result); byte[] enDataSize = new byte[4]; enDataBlock.getPointer().read(0L, enDataSize, 0,4); int size = enDataSize[0] & 0xFF | (enDataSize[1] & 0xFF) << 8 | (enDataSize[2] & 0xFF) << 16 | (enDataSize[3] & 0xFF) << 24; byte[] enDataPtr = new byte[4]; enDataBlock.getPointer().read(0L, enDataPtr, 0,4); int prt = enDataPtr[0] & 0xFF | (enDataPtr[1] & 0xFF) << 8 | (enDataPtr[2] & 0xFF) << 16 | (enDataPtr[3] & 0xFF) << 24; byte[] buf = new byte[(int)size]; //memory.pointer(prt).read(0, buf, 0, (int) size); unicorn.mem_read(prt, size); System.out.println(new String(buf)); return new String(buf); }
libcms.zip