diff --git a/app/src/main/java/io/github/chipppppppppp/lime/hooks/ModifyRequest.java b/app/src/main/java/io/github/chipppppppppp/lime/hooks/ModifyRequest.java index 94c45db8..3d04b55b 100644 --- a/app/src/main/java/io/github/chipppppppppp/lime/hooks/ModifyRequest.java +++ b/app/src/main/java/io/github/chipppppppppp/lime/hooks/ModifyRequest.java @@ -26,8 +26,8 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable { ctx.setOptimizationLevel(-1); try { Scriptable scope = ctx.initStandardObjects(); - Object jsCommunication = Context.javaToJS(new Communication(Communication.Type.REQUEST, param.args[0].toString(), param.args[1]), scope); - ScriptableObject.putProperty(scope, "communication", jsCommunication); + Object jsData = Context.javaToJS(new Communication(Communication.Type.REQUEST, param.args[0].toString(), param.args[1]), scope); + ScriptableObject.putProperty(scope, "data", jsData); ScriptableObject.putProperty(scope, "console", Context.javaToJS(new Console(), scope)); ctx.evaluateString(scope, script, "Script", 1, null); } catch (Exception e) { diff --git a/app/src/main/java/io/github/chipppppppppp/lime/hooks/ModifyResponse.java b/app/src/main/java/io/github/chipppppppppp/lime/hooks/ModifyResponse.java index 414239e9..23878a3f 100644 --- a/app/src/main/java/io/github/chipppppppppp/lime/hooks/ModifyResponse.java +++ b/app/src/main/java/io/github/chipppppppppp/lime/hooks/ModifyResponse.java @@ -26,8 +26,8 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable { ctx.setOptimizationLevel(-1); try { Scriptable scope = ctx.initStandardObjects(); - Object jsCommunication = Context.javaToJS(new Communication(Communication.Type.RESPONSE, param.args[0].toString(), param.args[1]), scope); - ScriptableObject.putProperty(scope, "communication", jsCommunication); + Object jsData = Context.javaToJS(new Communication(Communication.Type.RESPONSE, param.args[0].toString(), param.args[1]), scope); + ScriptableObject.putProperty(scope, "data", jsData); ScriptableObject.putProperty(scope, "console", Context.javaToJS(new Console(), scope)); ctx.evaluateString(scope, script, "Script", 1, null); } catch (Exception e) {