function
hook_native() {
var
libsswlcrypto = Module.findBaseAddress(
"libopensslSafeLib.so"
);
var
hsAddr = libsswlcrypto.add(0x88368);
let
output;
Interceptor.attach(hsAddr, {
onEnter:
function
(args) {
console.log(
"args[0]: "
+ args[0].readCString());
console.log(
"args[1]: "
+ args[1].readCString());
console.log(
"args[2]: "
+ args[2].readCString());
console.log(
"args[3]: "
+ args[3].toInt32());
this
.output = args[4];
},
onLeave:
function
(retval) {
console.log(
"base64EncodeOut"
,
Memory.readCString(Memory.readPointer(
this
.output))
);
},
});
}