No validate for 64-bit SHSH, pyenv/python2 stuff

This commit is contained in:
LukeZGD 2023-07-18 17:45:45 +08:00
parent a6e57068c4
commit 7b14c75a54
2 changed files with 34 additions and 18 deletions

View File

@ -16,7 +16,7 @@
- For iPhone 5 (not 5C), 7.0.x blobs can also be used - For iPhone 5 (not 5C), 7.0.x blobs can also be used
- Device support is limited, see below - Device support is limited, see below
- Option to **jailbreak** all supported 32-bit devices - Option to **jailbreak** all supported 32-bit devices
- Available on iOS versions 3.2.2, 4.x, 5.x, 6.x, 7.x, 8.x - Available on iOS versions 3.1.3, 3.2.2, 4.x, 5.x, 6.x, 7.x, 8.x
- Only unsupported version is jailbreaking iPad 2 on 4.3.x - Only unsupported version is jailbreaking iPad 2 on 4.3.x
- There are two methods of jailbreaking: Custom IPSW and SSH Ramdisk - There are two methods of jailbreaking: Custom IPSW and SSH Ramdisk
- Restore to iOS 10.3.3 on supported A7 devices **(OTA signed)** - Restore to iOS 10.3.3 on supported A7 devices **(OTA signed)**

View File

@ -257,9 +257,8 @@ set_tool_paths() {
ping="ping -n 1" ping="ping -n 1"
error "Using Legacy iOS Kit on Windows is not supported. Use on Linux or macOS instead." "You can continue by commenting this line, but I do not recommend doing that."
if [[ ! -d $dir || ! -d ../.git ]]; then if [[ ! -d $dir || ! -d ../.git ]]; then
error "stuff's missing, git clone the repo" error "Using Legacy iOS Kit on Windows is not supported. Use on Linux or macOS instead." "You can continue by git cloning this repo, but I do not recommend using this on Windows in any case."
fi fi
warn "Using Legacy iOS Kit on Windows is not recommended." warn "Using Legacy iOS Kit on Windows is not recommended."
print "* Many features of Legacy iOS Kit will not work on Windows." print "* Many features of Legacy iOS Kit will not work on Windows."
@ -344,7 +343,7 @@ install_depends() {
fi fi
if [[ $distro == "arch" ]]; then if [[ $distro == "arch" ]]; then
sudo pacman -Sy --noconfirm --needed base-devel curl jq libimobiledevice openssh python udev unzip usbmuxd usbutils vim zenity zip sudo pacman -Sy --noconfirm --needed base-devel curl jq libimobiledevice openssh pyenv python udev unzip usbmuxd usbutils vim zenity zip
elif [[ $distro == "debian" ]]; then elif [[ $distro == "debian" ]]; then
if [[ -n $ubuntu_ver ]]; then if [[ -n $ubuntu_ver ]]; then
@ -352,6 +351,9 @@ install_depends() {
fi fi
sudo apt update sudo apt update
sudo apt install -y curl jq libimobiledevice6 libirecovery-common libssl3 openssh-client python3 unzip usbmuxd usbutils xxd zenity zip sudo apt install -y curl jq libimobiledevice6 libirecovery-common libssl3 openssh-client python3 unzip usbmuxd usbutils xxd zenity zip
if [[ -n $ubuntu_ver ]] && (( ubuntu_ver < 23 )); then
sudo apt install -y python2
fi
sudo systemctl enable --now udev systemd-udevd usbmuxd 2>/dev/null sudo systemctl enable --now udev systemd-udevd usbmuxd 2>/dev/null
elif [[ $distro == "fedora" ]]; then elif [[ $distro == "fedora" ]]; then
@ -359,7 +361,7 @@ install_depends() {
sudo ln -sf /etc/pki/tls/certs/ca-bundle.crt /etc/pki/tls/certs/ca-certificates.crt sudo ln -sf /etc/pki/tls/certs/ca-bundle.crt /etc/pki/tls/certs/ca-certificates.crt
elif [[ $distro == "opensuse" ]]; then elif [[ $distro == "opensuse" ]]; then
sudo zypper -n in curl jq libimobiledevice-1_0-6 openssl-3 python3 usbmuxd unzip vim zenity zip sudo zypper -n in curl jq libimobiledevice-1_0-6 openssl-3 pyenv python3 usbmuxd unzip vim zenity zip
elif [[ $distro == "gentoo" ]]; then elif [[ $distro == "gentoo" ]]; then
sudo emerge -av net-misc/curl app-misc/jq libimobiledevice openssh python udev unzip usbmuxd usbutils vim zenity sudo emerge -av net-misc/curl app-misc/jq libimobiledevice openssh python udev unzip usbmuxd usbutils vim zenity
@ -1092,9 +1094,16 @@ device_ipwndfu() {
python2="sudo " python2="sudo "
fi fi
python2+="$HOME/.pyenv/versions/2.7.18/bin/python2" python2+="$HOME/.pyenv/versions/2.7.18/bin/python2"
elif [[ $(which pyenv) ]]; then
log "Installing python2 using pyenv"
$(which pyenv) install 2.7.18
elif [[ -z $python2 ]]; then elif [[ -z $python2 ]]; then
error "Python 2 is not installed, cannot continue. Make sure to have python2 installed to use ipwndfu." \ warn "pyenv and python2 is not installed. Attempting to install pyenv and python2 before continuing"
"* You may install python2 from pyenv: pyenv install 2.7.18" print "* You may install python2 from pyenv: pyenv install 2.7.18"
log "Installing pyenv"
curl https://pyenv.run | bash
log "Installing python2 using pyenv"
$HOME/.pyenv/bin/pyenv install 2.7.18
fi fi
device_enter_mode DFU device_enter_mode DFU
@ -2582,11 +2591,16 @@ restore_prepare() {
restore_latest restore_latest
else else
# 64-bit devices A7/A8 # 64-bit devices A7/A8
print "* Make sure to set the nonce generator of your device!" local generator=$(cat "$shsh_path" | grep "<string>0x" | cut -c10-27)
log "The generator for your SHSH blob is: $generator"
print "* Before continuing, make sure to set the nonce generator of your device!"
print "* For iOS 10 and older: https://github.com/tihmstar/futurerestore#how-to-use" print "* For iOS 10 and older: https://github.com/tihmstar/futurerestore#how-to-use"
print "* For iOS 11 and newer: https://github.com/futurerestore/futurerestore/#method" print "* For iOS 11 and newer: https://github.com/futurerestore/futurerestore/#using-dimentio"
print "* Also check the SEP/BB Compatibility Chart (Legacy iOS 12 sheet): https://docs.google.com/spreadsheets/d/1Mb1UNm6g3yvdQD67M413GYSaJ4uoNhLgpkc7YKi3LBs" print "* Also check the SEP/BB Compatibility Chart (Legacy iOS 12 sheet): https://docs.google.com/spreadsheets/d/1Mb1UNm6g3yvdQD67M413GYSaJ4uoNhLgpkc7YKi3LBs/edit#gid=1191207636"
pause pause
if [[ $device_mode == "Normal" ]]; then
device_enter_mode Recovery
fi
restore_futurerestore restore_futurerestore
fi fi
;; ;;
@ -3634,6 +3648,7 @@ menu_shsh_browse() {
[[ ! -s "$newpath" ]] && read -p "$(input "Enter path to $text IPSW file (or press Ctrl+C to cancel): ")" newpath [[ ! -s "$newpath" ]] && read -p "$(input "Enter path to $text IPSW file (or press Ctrl+C to cancel): ")" newpath
[[ ! -s "$newpath" ]] && return [[ ! -s "$newpath" ]] && return
log "Selected SHSH file: $newpath" log "Selected SHSH file: $newpath"
if (( device_proc < 7 )); then
log "Validating..." log "Validating..."
if [[ $1 == "base" ]]; then if [[ $1 == "base" ]]; then
val="$ipsw_base_path.ipsw" val="$ipsw_base_path.ipsw"
@ -3643,6 +3658,7 @@ menu_shsh_browse() {
warn "Validation failed. Did you select the correct IPSW/SHSH?" warn "Validation failed. Did you select the correct IPSW/SHSH?"
pause pause
fi fi
fi
shsh_path="$newpath" shsh_path="$newpath"
} }