From 24250c8af1ed10e4ef1ca88cc1476ccf7e1a06c1 Mon Sep 17 00:00:00 2001 From: LukeZGD <26163116+LukeZGD@users.noreply.github.com> Date: Fri, 10 Feb 2023 17:17:11 +0800 Subject: [PATCH] Fix for onboard blob dumping --- restore.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/restore.sh b/restore.sh index b58d4fd..3e96c0d 100755 --- a/restore.sh +++ b/restore.sh @@ -31,6 +31,9 @@ pause() { clean() { rm -rf "$(dirname "$0")/tmp/"* "$(dirname "$0")/iP"*/ "$(dirname "$0")/tmp/" + if [[ $device_sudoloop == 1 ]]; then + sudo rm -rf /tmp/futurerestore /tmp/*.json "$(dirname "$0")/tmp/"* "$(dirname "$0")/iP"*/ "$(dirname "$0")/tmp/" + fi } clean_and_exit() { @@ -38,9 +41,6 @@ clean_and_exit() { input "Press Enter/Return to exit." read -s fi - if [[ $device_sudoloop == 1 ]]; then - sudo rm -rf /tmp/futurerestore /tmp/*.json - fi clean kill $iproxy_pid $httpserver_pid $sudoloop_pid 2>/dev/null exit $1 @@ -182,6 +182,7 @@ set_tool_paths() { idevicererestore="sudo " ipwnder="sudo " irecovery="sudo " + irecovery2="sudo " sudo chmod +x $dir/* fi @@ -259,6 +260,7 @@ set_tool_paths() { idevicerestore+="$dir/idevicerestore" idevicererestore+="$dir/idevicererestore" ipwnder+="$dir/ipwnder" + irecovery2+="$dir/irecovery2" scp="$(which scp) -F ../resources/ssh_config" ssh="$(which ssh) -F ../resources/ssh_config" } @@ -2283,8 +2285,8 @@ shsh_save_onboard() { if [[ $platform == "windows" ]]; then "$dir/shshdump" else - (echo -e "/send ../resources/payload\ngo blobs\n/exit") | ${irecovery}2 -s - ${irecovery}2 -g dump.shsh + (echo -e "/send ../resources/payload\ngo blobs\n/exit") | $irecovery2 -s + $irecovery2 -g dump.shsh $irecovery -n fi "$dir/ticket" dump.shsh dump.plist "$ipsw_path.ipsw" -z