Update depends and tools

This commit is contained in:
LukeZGD 2022-06-29 13:00:32 +08:00
parent c7690f4279
commit e9fdf2bf49
4 changed files with 12 additions and 13 deletions

View File

@ -75,25 +75,24 @@ SetToolPaths() {
SCP="$(which scp) $SSH"
SSH="$(which ssh) $SSH"
tsschecker="./resources/tools/tsschecker_$platform"
xpwntool="./xpwntool"
xpwntool="../resources/tools/xpwntool_$platform"
if [[ $platform == "linux" ]]; then
# openssl
opensslver=$(openssl version | awk '{print $2}' | cut -c -3)
if [[ $opensslver != "1.1" ]]; then
cherrybin="env LD_LIBRARY_PATH=../resources/lib $cherrybin"
idevicerestore="sudo LD_LIBRARY_PATH=../resources/lib $idevicerestore"
xpwntool="env LD_LIBRARY_PATH=../resources/lib $xpwntool"
fi
# these need to run as root for device detection
expect="sudo $expect"
futurerestore="sudo $futurerestore"
[[ -z $idevicerestore ]] && idevicerestore="sudo $idevicerestore"
idevicerestore="sudo $idevicerestore"
ipwndfu="sudo $ipwndfu"
irecovery="sudo LD_LIBRARY_PATH=./resources/lib $irecovery"
irecovery2="sudo LD_LIBRARY_PATH=./resources/lib $irecovery2"
pwnedDFU="sudo $pwnedDFU"
rmsigchks="sudo $rmsigchks"
# openssl
opensslver=$(openssl version | awk '{print $2}' | cut -c -3)
if [[ $opensslver == "3"* ]]; then
cherrybin="env LD_LIBRARY_PATH=../resources/lib $cherrybin"
idevicerestore="sudo LD_LIBRARY_PATH=./resources/lib ./resources/tools/idevicerestore_$platform"
fi
elif [[ $platform == "macos" ]]; then
# for macOS 12.3 and newer
@ -171,11 +170,11 @@ InstallDepends() {
elif [[ $ID == "fedora" ]] && (( VERSION_ID >= 35 )); then
ln -sf /usr/lib64/libbz2.so.1.* ../resources/lib/libbz2.so.1.0
sudo dnf install -y bsdiff expect libimobiledevice perl-Digest-SHA python2 vim-common xmlstarlet zenity
sudo dnf install -y bsdiff expect libimobiledevice openssl perl-Digest-SHA python2 vim-common xmlstarlet zenity
elif [[ $ID == "opensuse-tumbleweed" || $PRETTY_NAME == *"Leap 15.4" ]]; then
[[ $ID == "opensuse-leap" ]] && ln -sf /lib64/libreadline.so.7 ../resources/lib/libreadline.so.8
sudo zypper -n in bsdiff curl expect libimobiledevice-1_0-6 python-base vim xmlstarlet zenity
sudo zypper -n in bsdiff curl expect libimobiledevice-1_0-6 openssl python-base vim xmlstarlet zenity
elif [[ $platform == "macos" ]]; then
xcode-select --install

View File

@ -348,11 +348,11 @@ IPSW4() {
Log "Verbose boot option disabled by user."
fi
Log "Preparing custom IPSW with ch3rryflower..."
cp -rf ../$cherry/bin/* ../$cherrymac/FirmwareBundles ../$cherrymac/src .
cp -rf ../$cherrymac/FirmwareBundles ../$cherrymac/src .
unzip -j ../$IPSW.ipsw Firmware/all_flash/all_flash.${HWModel}ap.production/iBoot*
mv iBoot.${HWModel}ap.RELEASE.img3 tmp
$xpwntool tmp ibot.dec -iv $IV -k $Key
./iBoot32Patcher ibot.dec ibot.pwned --rsa --boot-partition --boot-ramdisk $ExtraArgs
../$cherry/bin/iBoot32Patcher ibot.dec ibot.pwned --rsa --boot-partition --boot-ramdisk $ExtraArgs
$xpwntool ibot.pwned iBoot -t tmp
echo "0000010: 6365" | xxd -r - iBoot
echo "0000020: 6365" | xxd -r - iBoot

BIN
resources/tools/xpwntool_linux Executable file

Binary file not shown.

BIN
resources/tools/xpwntool_macos Executable file

Binary file not shown.