From 9c6b99d73cad94e7a50f6e55c3c95a27b75a37a2 Mon Sep 17 00:00:00 2001 From: Chris Spankroy Date: Tue, 15 Nov 2022 16:45:09 -0600 Subject: [PATCH] Update palera1n.sh (#234) Fixes issue where incorrect model is used for downloading files when multiple models exist in IPSW --- palera1n.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/palera1n.sh b/palera1n.sh index f684aa2..1370545 100755 --- a/palera1n.sh +++ b/palera1n.sh @@ -451,7 +451,7 @@ if [ ! -f blobs/"$deviceid"-"$version".shsh2 ]; then echo "[*] Downloading BuildManifest" "$dir"/pzb -g BuildManifest.plist "$ipswurl" echo "[*] Downloading kernelcache" - "$dir"/pzb -g "$(awk "/""$cpid""/{x=1}x&&/kernelcache.release/{print;exit}" BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1)" "$ipswurl" + "$dir"/pzb -g "$(awk "/""$model""/{x=1}x&&/kernelcache.release/{print;exit}" BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1)" "$ipswurl" mv kernelcache.release.* work/kernelcache if [[ "$deviceid" == "iPhone8"* ]] || [[ "$deviceid" == "iPad6"* ]]|| [[ "$deviceid" == *'iPad5'* ]]; then python3 -m pyimg4 im4p extract -i work/kernelcache -o work/kcache.raw --extra work/kpp.bin @@ -532,12 +532,12 @@ if [ ! -f boot-"$deviceid"/ibot.img4 ]; then "$dir"/pzb -g BuildManifest.plist "$ipswurl" echo "[*] Downloading and decrypting iBSS" - "$dir"/pzb -g "$(awk "/""$cpid""/{x=1}x&&/iBSS[.]/{print;exit}" BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1)" "$ipswurl" - "$dir"/gaster decrypt "$(awk "/""$cpid""/{x=1}x&&/iBSS[.]/{print;exit}" BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1 | sed 's/Firmware[/]dfu[/]//')" iBSS.dec + "$dir"/pzb -g "$(awk "/""$model""/{x=1}x&&/iBSS[.]/{print;exit}" BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1)" "$ipswurl" + "$dir"/gaster decrypt "$(awk "/""$model""/{x=1}x&&/iBSS[.]/{print;exit}" BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1 | sed 's/Firmware[/]dfu[/]//')" iBSS.dec echo "[*] Downloading and decrypting iBoot" - "$dir"/pzb -g "$(awk "/""$cpid""/{x=1}x&&/iBoot[.]/{print;exit}" BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1)" "$ipswurl" - "$dir"/gaster decrypt "$(awk "/""$cpid""/{x=1}x&&/iBoot[.]/{print;exit}" BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1 | sed 's/Firmware[/]all_flash[/]//')" ibot.dec + "$dir"/pzb -g "$(awk "/""$model""/{x=1}x&&/iBoot[.]/{print;exit}" BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1)" "$ipswurl" + "$dir"/gaster decrypt "$(awk "/""$model""/{x=1}x&&/iBoot[.]/{print;exit}" BuildManifest.plist | grep '' | cut -d\> -f2 | cut -d\< -f1 | sed 's/Firmware[/]all_flash[/]//')" ibot.dec echo "[*] Patching and signing iBSS/iBoot" "$dir"/iBoot64Patcher iBSS.dec iBSS.patched