2022-10-07 20:29:30 +08:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
|
|
|
|
if [ ! -d "./out" ]
|
|
|
|
then
|
|
|
|
mkdir -p ./out
|
|
|
|
fi
|
|
|
|
|
2022-10-08 00:34:06 +08:00
|
|
|
if [ -d "./out/tmppwn" ]
|
|
|
|
then
|
|
|
|
rm -rf ./out/tmppwn
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -f "./out/TrollInstaller2_arm64e.ipa" ]
|
|
|
|
then
|
|
|
|
rm ./out/TrollInstaller2_arm64e.ipa
|
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir ./out/tmppwn || true 2> /dev/null
|
|
|
|
|
2022-10-07 15:17:36 +08:00
|
|
|
cd ../Installer/TrollInstaller2
|
2022-10-07 07:25:20 +08:00
|
|
|
make clean
|
|
|
|
make package
|
2022-10-08 00:34:06 +08:00
|
|
|
cd - 2> /dev/null
|
|
|
|
|
|
|
|
lipo -thin arm64e ../Installer/TrollInstaller2/.theos/obj/debug/TrollInstaller2.app/TrollInstaller2 -output ./out/tmppwn/pwn_arm64e
|
|
|
|
ldid -S -M -Kcert.p12 ./out/tmppwn/pwn_arm64e
|
2022-10-07 07:25:20 +08:00
|
|
|
|
2022-10-08 00:34:06 +08:00
|
|
|
unzip ./target/InstallerVictim.ipa -d ./out/tmppwn
|
2022-10-07 07:25:20 +08:00
|
|
|
|
2022-10-08 00:34:06 +08:00
|
|
|
cd ./out/tmppwn/Payload
|
|
|
|
APP_NAME=$(find *.app -maxdepth 0)
|
|
|
|
BINARY_NAME=$(echo "$APP_NAME" | cut -f 1 -d '.')
|
|
|
|
cd - 2> /dev/null
|
2022-10-07 07:25:20 +08:00
|
|
|
|
2022-10-08 00:34:06 +08:00
|
|
|
./pwnify_compiled ./out/tmppwn/Payload/$APP_NAME/$BINARY_NAME ./out/tmppwn/pwn_arm64e
|
|
|
|
rm ./out/tmppwn/pwn_arm64e
|
2022-10-07 07:25:20 +08:00
|
|
|
|
2022-10-08 00:34:06 +08:00
|
|
|
cd ./out/tmppwn
|
|
|
|
zip -vr ../TrollInstaller2_arm64e.ipa *
|
2022-10-07 07:25:20 +08:00
|
|
|
cd -
|
|
|
|
|
2022-10-08 00:34:06 +08:00
|
|
|
rm -rf ./out/tmppwn
|