Skip to content

Instantly share code, notes, and snippets.

@Frago9876543210
Created January 12, 2019 14:21
Show Gist options
  • Save Frago9876543210/6ec2ee7e1da3691d806888d54c35d854 to your computer and use it in GitHub Desktop.
Save Frago9876543210/6ec2ee7e1da3691d806888d54c35d854 to your computer and use it in GitHub Desktop.
//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