- 發Rreques之前
- Activity 開始載入
Last active
December 30, 2023 21:49
-
-
Save jimmy947788/8ef425fb8dc69f5b72503d1b502c04df to your computer and use it in GitHub Desktop.
frida hook classLoader
This file contains hidden or 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
function hook_classLoader() { | |
Java.perform(function () { | |
Java.enumerateLoadedClasses({ | |
onMatch: function (className) { | |
try { | |
if (className == "om.b") { | |
var om_b = Java.use("om.b"); | |
console.log(om_b); | |
om_b["o"].implementation = function (jVar) { | |
console.log(`om.b.o is called: jVar=${jVar}`); | |
this["o"](jVar); | |
}; | |
om_b["p"].implementation = function (iVar) { | |
console.log(`om.b.p is called: iVar=${iVar}`); | |
this["p"](iVar); | |
}; | |
om_b["r"].implementation = function (obj, str) { | |
console.log(`om.b.r is called: obj=${obj}, str=${str}`); | |
if (str == "before_login") { | |
} | |
let result = this["r"](obj, str); | |
console.log(`om.b.r result=${result}`); | |
return result; | |
}; | |
om_b["s"].implementation = function (obj, str) { | |
console.log(`om.b.s is called: obj=${obj}, str=${str}`); | |
let result = this["s"](obj, str); | |
console.log(`om.b.s result=${result}`); | |
return result; | |
}; | |
om_b["t"].implementation = function (obj, str, str2) { | |
console.log(`om.b.t is called: obj=${obj}, str=${str}, str2=${str2}`); | |
let result = this["t"](obj, str, str2); | |
console.log(`om.b.t result=${result}`); | |
return result; | |
}; | |
} | |
} catch (error) { | |
console.log(error); | |
} | |
}, | |
onComplete: function () { } | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment