-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinject.sh
executable file
·33 lines (30 loc) · 1.05 KB
/
inject.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/system/bin/sh
fridaserver=/data/local/tmp/frida-server-12.8.12-android-arm
fridainject=/data/local/tmp/frida-inject-12.8.12-android-arm
allowscript=/data/local/tmp/allow.js
pscommand="ps" # note: you may need to use "ps -e"
scriptname="inject.sh"
echo "[$scriptname] starting"
while true
do
fridarunning=`$pscommand | grep frida-server | wc -l`
scriptrunning=`$pscommand | grep frida-inject | wc -l`
if [ $fridarunning -ne 1 ]
then
if [ $scriptrunning -eq 1 ]
then
echo "[$scriptname] killing inject"
$pscommand | grep frida-inject | xargs sh -c 'kill -9 $1'
fi
echo "[$scriptname] starting frida"
$fridaserver -D
fi
sleep 10
scriptrunning=`$pscommand | grep frida-inject | wc -l`
if [ $scriptrunning -ne 1 ]
then
echo "[$scriptname] starting inject"
$fridainject -n com.google.android.gms.persistent -s $allowscript -P '{"packageName":"de.rki.coronawarnapp.dev","signatureSha":"854528796DB85A3155FAAF92043CD3C42163CB9FA3C6709324A7F39DF4158462","forcedk":"true","unlimiteddk":"true"}' &
fi
sleep 10
done