Created
January 12, 2019 14:21
-
-
Save Frago9876543210/6ec2ee7e1da3691d806888d54c35d854 to your computer and use it in GitHub Desktop.
This file contains 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