From 96acf7f78f392aac879a47b08cb0ae8664513a06 Mon Sep 17 00:00:00 2001 From: noobpk Date: Fri, 23 Aug 2024 16:12:10 +0700 Subject: [PATCH] update android script --- android_handlers.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/android_handlers.js b/android_handlers.js index b83cf4e..147067e 100644 --- a/android_handlers.js +++ b/android_handlers.js @@ -22,8 +22,11 @@ Java.perform(function () { var response_class = Java.use(''); var response_method = ''; - request_class.request_method.overload('java.lang.String').implementation = function (request) { - console.log(colors.green, "[Original Request Body]\n", colors.resetColor, JSON.stringify(request), '\n'); + request_class.request_method.overload('java.lang.String').implementation = function (arg0) { + console.log(colors.green, "[Original Request Body]\n", colors.resetColor, JSON.stringify(arg0), '\n'); + + var js = {}; + send({ from: '/http', payload: JSON.stringify(js), api_path: 'request' }) var rcv_data = "FAILURE"; @@ -46,8 +49,11 @@ Java.perform(function () { return result; } - response_class.response_method.overload('java.lang.String').implementation = function (response) { - console.log(colors.green, "[Original Response Body]\n", colors.resetColor, JSON.stringify(response), '\n'); + response_class.response_method.overload('java.lang.String').implementation = function (arg0) { + console.log(colors.green, "[Original Response Body]\n", colors.resetColor, JSON.stringify(arg0), '\n'); + + var js = {}; + send({ from: '/http', payload: JSON.stringify(js), api_path: 'response' }) var rcv_data = "FAILURE";