-
Notifications
You must be signed in to change notification settings - Fork 61
/
pinan2.js
31 lines (30 loc) · 1.3 KB
/
pinan2.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
function c(){
const hooks = Module.load('libSparta.so');
var Exports = hooks.enumerateExports();
for(var i = 0; i < Exports.length; i++) {
var str;
Java.perform(function () {
str = Java.use("java.lang.String");
});
if(Exports[i].name=="start"){
//函数类型
console.log("type:",Exports[i].type);
//函数名称
console.log("name:",Exports[i].name);
//函数地址
console.log("address:",(Exports[i].address));
Interceptor.attach(Exports[i].address, {
onEnter: function (args) {
// Java.vm.getEnv().GetObjectClass(args[0])
// console.log("param1>>>>>>>>>>>>>>>>--------------------------"+Memory.readUtf16String(args[0]));
},
onLeave: function (retval) {
// console.log("param1>>>>>>>>>>>>>>>>--------------------------")
// var result=Java.vm.getEnv().newStringUtf(retval)
// console.log("param result>>>>>>>>>>>>>>>>--------------------------"+Java.cast(retval, str));
}
});
}
}
}
c()