1. Java.perform(function () {
    2. console.log("start hooking...");
    3. function showstack() {
    4. var log = Java.use("android.util.Log");
    5. var Throwable = Java.use("java.lang.Throwable");
    6. console.log(log.getStackTraceString(Throwable.$new()))
    7. }
    8. var jSONObject = Java.use("org.json.JSONObject");
    9. jSONObject.put.overload('java.lang.String', 'java.lang.Object').implementation = function (a, b) {
    10. showstack();
    11. console.log("jSONObject.put: ", a, b);
    12. return this.put(a, b);
    13. }
    14. jSONObject.getString.implementation = function (a) {
    15. console.log("jSONObject.getString: ", a);
    16. var result = this.getString(a);
    17. console.log("jSONObject.getString result: ", result);
    18. return result;
    19. }
    20. })

    image.png
    对json数据的处理