-
-
Save hanbule/0d27655d7252cffa962d7fd71a3e8bcd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//frida-trace -U -i "_ZN14TransferPacket4readER12BinaryStream" com.mojang.minecraftpe | |
//Tested on MCPE 1.1.4 | |
{ | |
onEnter: function(log, args, state) { | |
this.ptr = args[0]; | |
}, | |
onLeave: function(log, retval, state) { | |
realAddr = Memory.readPointer(this.ptr.add(12)); | |
rlen = Memory.readU32(realAddr.sub(12)); | |
uint8arr = new Uint8Array(Memory.readByteArray(realAddr, rlen)); | |
var string = String.fromCharCode.apply(null, uint8arr), | |
host = decodeURIComponent(escape(string)); | |
console.log(host + ':' + Memory.readU16(this.ptr.add(16))); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment