From ece6c33b63da40fe9a85f6a423ad28db0db8f596 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=95=E3=81=95?= <91324887+sasa8810@users.noreply.github.com> Date: Fri, 1 Sep 2023 19:30:05 +0900 Subject: [PATCH] ipsw downloader --- downr1n.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/downr1n.sh b/downr1n.sh index f6edffc..d653b76 100755 --- a/downr1n.sh +++ b/downr1n.sh @@ -13,21 +13,30 @@ cd .. echo "[*] Command ran:`if [ $EUID = 0 ]; then echo " sudo"; fi` ./downr1n.sh $@" + + # ========= # Variables # ========= -ipsw=$(ls ipsw/*.ipsw) # put your ipsw version="2.0" os=$(uname) dir="$(pwd)/binaries/$os" max_args=2 arg_count=0 extractedIpsw="ipsw/extracted/" +deviceid=$("$dir"/irecovery -q | grep PRODUCT | sed 's/PRODUCT: //') if [ ! -d "ramdisk/" ]; then git clone https://github.com/dualra1n/ramdisk.git fi +if [ ! -e ipsw/*.ipsw ]; then + "$dir"/aria2c -x16 -s16 -j16 "$(curl -sL "https://api.ipsw.me/v4/device/$deviceid?type=ipsw" | "$dir"/jq '.firmwares | .[] | select(.version=="'$1'")' | "$dir"/jq -s '.[0] | .url' --raw-output)" + mv *.ipsw ipsw +fi + +ipsw=$(ls ipsw/*.ipsw) # put your ipsw + if [ -e .downgraded ]; then downgrade=1 fi