From 53ac0239b9a8e162bd0cd4135580a89c694262cf Mon Sep 17 00:00:00 2001 From: Mineek Date: Tue, 4 Oct 2022 16:24:16 +0200 Subject: [PATCH] get ota zip url automatically --- palera1n.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/palera1n.sh b/palera1n.sh index 0f1b106..98a48da 100755 --- a/palera1n.sh +++ b/palera1n.sh @@ -160,6 +160,17 @@ _exit_handler() { } trap _exit_handler EXIT +# ========= +# Json parser +# ========= +# get beta url +_beta_url() { + json=$(curl -s https://raw.githubusercontent.com/littlebyteorg/appledb/main/iosFiles/iOS/19x%20-%2015.x/19B5060d.json) + sources=$(echo "$json" | $dir/jq -r '.sources') + beta_url=$(echo "$sources" | $dir/jq -r --arg deviceid "$deviceid" '.[] | select(.type == "ota" and (.deviceMap | index($deviceid))) | .links[0].url') + echo "$beta_url" +} + # =========== # Fixes # =========== @@ -412,7 +423,7 @@ if [ ! -e boot-"$deviceid" ]; then # if tweaks, set ipswurl to a custom one if [ "$1" = "--tweaks" ]; then - read -p "[*] Enter the URL of the OTA ZIP of 15.1b3 of your device: " ipswurl + ipswurl=$(_beta_url) fi # Downloading files, and decrypting iBSS/iBEC