|
var base = Module.findBaseAddress("libUE4.so");
//明文收包打印
Interceptor.attach(base.add(0x742392C), {
onEnter: function(args) {
if(this.context.lr.sub(base) != 0x7422ffc) return;
this.is = 1;
console.log("---------------------Recv");
console.log("args[0]:" + args[0] +" args[1]:" + args[1]+" args[2]:" + args[2]+" args[3]:" + args[3]+" args[4]:" + args[4]+" args[5]:" + args[5] +" args[6]:" + args[6] +" args[7]:" + args[7] );
//console.log(Thread.backtrace(this.context, Backtracer.ACCURATE).map(DebugSymbol.fromAddress).join('\n') + '\n');
},
onLeave:function (ret) {
if (this.is == 1){
console.log(hexdump(ret,{length:0x100}));// 结构是 长度 + proto 数据
}
}
});
//明文发包打印
Interceptor.attach(base.add(0x7430A18), {
onEnter: function(args) {
console.log("---------------------Sends");
console.log("args[0]:" + args[0] +" args[1]:" + args[1]+" args[2]:" + args[2]+" args[3]:" + args[3]+" args[4]:" + args[4]+" args[5]:" + args[5] +" args[6]:" + args[6] +" args[7]:" + args[7] );
//console.log(Thread.backtrace(this.context, Backtracer.ACCURATE).map(DebugSymbol.fromAddress).join('\n') + '\n');
console.log(hexdump(args[2],{length:args[3].toInt32()}));// 打印 proto 数据
},
onLeave:function (ret) {
}
});
|
|