From 0550739418d3cad8b375e543d89b76a659f701e3 Mon Sep 17 00:00:00 2001 From: Mathieu Strypsteen Date: Mon, 4 Mar 2024 18:35:15 +0100 Subject: [PATCH] Add authentication --- inject-frida.sh | 1 + libfrida-gadget.config.so | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/inject-frida.sh b/inject-frida.sh index f2ff130..2b6113e 100755 --- a/inject-frida.sh +++ b/inject-frida.sh @@ -8,6 +8,7 @@ fi /patch-main.py mkdir -p app/lib/arm64-v8a cp /libfrida-gadget.so /libfrida-gadget.config.so app/lib/arm64-v8a +sed "s/FRIDA_TOKEN/${FRIDA_TOKEN:-secret}/" -i app/lib/arm64-v8a/libfrida-gadget.config.so java -jar /apktool.jar b -o patched.apk app java -jar /apk-signer.jar --overwrite -a patched.apk cp patched.apk /data diff --git a/libfrida-gadget.config.so b/libfrida-gadget.config.so index a43205c..5bf317c 100644 --- a/libfrida-gadget.config.so +++ b/libfrida-gadget.config.so @@ -2,6 +2,7 @@ "interaction": { "type": "listen", "address": "0.0.0.0", - "port": 27042 + "port": 27042, + "token": "FRIDA_TOKEN" } }