From c73328de9a73dcb986b6a8330303a9f409db4e02 Mon Sep 17 00:00:00 2001 From: LukeZGD <26163116+LukeZGD@users.noreply.github.com> Date: Sat, 4 Mar 2023 07:36:11 +0800 Subject: [PATCH] Skip pwnDFU option if device already pwned for #274 --- restore.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/restore.sh b/restore.sh index a4a23c8..c20c27e 100755 --- a/restore.sh +++ b/restore.sh @@ -831,6 +831,7 @@ device_enter_mode() { clean_and_exit fi + irec_pwned=$($irecovery -q | grep -c "PWND") if [[ $device_mode == "DFU" && $mode != "pwned-ibss" && $device_proc != 4 ]] && (( device_proc < 7 )); then print "* Select Y if your device is in pwned iBSS/kDFU mode." print "* Select N to place device to pwned DFU mode using ipwndfu/ipwnder." @@ -839,6 +840,8 @@ device_enter_mode() { log "Pwned iBSS/kDFU mode specified by user." return fi + elif [[ $irec_pwned == 1 ]]; then + return fi if [[ $device_proc == 5 ]]; then @@ -2294,7 +2297,6 @@ device_ramdisk4() { kernelcache.release.n90 ) print "* This uses files and script from 4tify by Zurac-Apps" - print "* Make sure that your device is already in DFU mode" if [[ ! $(ls ../resources/ramdisk) ]]; then local JailbreakLink=https://github.com/Zurac-Apps/4tify/raw/ad319e2774f54dc3a355812cc287f39f7c38cc66