Display linux checkm8 message on both A6 and A7

also do some changes in ramdisk func ibss/ibec stuff
This commit is contained in:
LukeZGD 2024-01-12 18:54:05 +08:00
parent 41b22d2bfb
commit e633b397da

View File

@ -1269,13 +1269,14 @@ device_enter_mode() {
log "Placing device to pwnDFU mode using ipwnder" log "Placing device to pwnDFU mode using ipwnder"
$ipwnder -p $ipwnder -p
tool_pwned=$? tool_pwned=$?
elif [[ $device_proc == 4 || $device_proc == 6 ]]; then elif [[ $device_proc == 4 ]]; then
# A4/A6 linux uses ipwndfu # A4 linux uses ipwndfu
device_ipwndfu pwn device_ipwndfu pwn
tool_pwned=$? tool_pwned=$?
else else
# A7 linux uses gaster # the linux checkm8 section. success rates are absolute garbage here
log "Placing device to pwnDFU mode using gaster" # A6 linux uses ipwndfu, A7 linux uses gaster
log "Please read the message below:"
print "* Unfortunately, success rates for checkm8 are very low on Linux." print "* Unfortunately, success rates for checkm8 are very low on Linux."
print "* Pwning using a Mac or another iOS device using iPwnder Lite are better options." print "* Pwning using a Mac or another iOS device using iPwnder Lite are better options."
print "* For more details, read the \"Troubleshooting\" wiki page in GitHub" print "* For more details, read the \"Troubleshooting\" wiki page in GitHub"
@ -1283,8 +1284,14 @@ device_enter_mode() {
print " - https://github.com/LukeZGD/Legacy-iOS-Kit/wiki/Troubleshooting" print " - https://github.com/LukeZGD/Legacy-iOS-Kit/wiki/Troubleshooting"
print " - https://github.com/LukeZGD/Legacy-iOS-Kit/wiki/Pwning-Using-Another-iOS-Device" print " - https://github.com/LukeZGD/Legacy-iOS-Kit/wiki/Pwning-Using-Another-iOS-Device"
print "* If pwning gets stuck, you can press Ctrl+C to cancel." print "* If pwning gets stuck, you can press Ctrl+C to cancel."
if [[ $device_proc == 7 ]]; then
log "Placing device to pwnDFU mode using gaster"
$gaster pwn $gaster pwn
tool_pwned=$? tool_pwned=$?
else
device_ipwndfu pwn
tool_pwned=$?
fi
fi fi
elif (( device_proc > 5 )) && [[ $(uname -m) != "x86_64" ]]; then elif (( device_proc > 5 )) && [[ $(uname -m) != "x86_64" ]]; then
# A6/A7 asi mac uses ipwnder_lite # A6/A7 asi mac uses ipwnder_lite
@ -1312,8 +1319,8 @@ device_enter_mode() {
;; ;;
esac esac
done done
log "Placing device to pwnDFU mode using: $opt"
if (( device_proc > 5 )); then if (( device_proc > 5 )); then
log "Please read the message below:"
print "* If you have an older Mac with Core 2 Duo, success rates for checkm8 are low." print "* If you have an older Mac with Core 2 Duo, success rates for checkm8 are low."
print "* Pwning using another Mac or iOS device using iPwnder Lite are available options if needed." print "* Pwning using another Mac or iOS device using iPwnder Lite are available options if needed."
print "* For more details, read the \"Troubleshooting\" wiki page in GitHub" print "* For more details, read the \"Troubleshooting\" wiki page in GitHub"
@ -1322,6 +1329,7 @@ device_enter_mode() {
print " - https://github.com/LukeZGD/Legacy-iOS-Kit/wiki/Pwning-Using-Another-iOS-Device" print " - https://github.com/LukeZGD/Legacy-iOS-Kit/wiki/Pwning-Using-Another-iOS-Device"
print "* If pwning gets stuck, you can press Ctrl+C to cancel." print "* If pwning gets stuck, you can press Ctrl+C to cancel."
fi fi
log "Placing device to pwnDFU mode using $opt"
$opt $opt
tool_pwned=$? tool_pwned=$?
fi fi
@ -1346,8 +1354,7 @@ device_enter_mode() {
} }
device_pwnerror() { device_pwnerror() {
local error_msg=$'\n* Exit DFU mode by holding the TOP and HOME buttons for about 15 seconds.' local error_msg=$'\n* Exit DFU mode first by holding the TOP and HOME buttons for about 10 seconds.'
error_msg+=$'\n* If you have an AMD CPU, you may have to try again on a machine with an Intel CPU.'
if [[ $platform == "linux" && $device_proc != 4 ]]; then if [[ $platform == "linux" && $device_proc != 4 ]]; then
error_msg+=$'\n* Unfortunately, success rates for checkm8 are very low on Linux.' error_msg+=$'\n* Unfortunately, success rates for checkm8 are very low on Linux.'
error_msg+=$'\n* Pwning using a Mac or another iOS device using iPwnder Lite are better options.' error_msg+=$'\n* Pwning using a Mac or another iOS device using iPwnder Lite are better options.'
@ -3837,7 +3844,7 @@ device_ramdisk() {
fi fi
log "Patch iBSS" log "Patch iBSS"
"$dir/xpwntool" iBSS.dec iBSS.raw "$dir/xpwntool" iBSS.dec iBSS.raw
if [[ $build_id == "7"* || $build_id == "8"* ]] && [[ $device_type != "iPad1"* ]]; then if [[ $build_id == "8"* && $device_type == "iPad2"* ]]; then
"$dir/iBoot32Patcher" iBSS.raw iBSS.patched --rsa -b "-v cs_enforcement_disable=1" "$dir/iBoot32Patcher" iBSS.raw iBSS.patched --rsa -b "-v cs_enforcement_disable=1"
else else
"$dir/iBoot32Patcher" iBSS.raw iBSS.patched --rsa -b "-v" "$dir/iBoot32Patcher" iBSS.raw iBSS.patched --rsa -b "-v"
@ -3879,15 +3886,12 @@ device_ramdisk() {
else else
device_enter_mode kDFU device_enter_mode kDFU
fi fi
if (( device_proc < 5 )); then
log "Sending iBSS..." log "Sending iBSS..."
if [[ $build_id == "7"* || $build_id == "8"* ]] && [[ $device_type == "iPad2"* ]]; then
device_rd_build=
patch_ibss
$irecovery -f pwnediBSS.dfu
else
$irecovery -f $ramdisk_path/iBSS $irecovery -f $ramdisk_path/iBSS
fi fi
if [[ $device_type != "iPod2,1" && $device_proc != 1 ]]; then if [[ $device_type != "iPod2,1" && $device_proc != 1 && $build_id != "7"* && $build_id != "8"* ]] ||
[[ $device_type == "iPad2"* ]]; then
sleep 1 sleep 1
log "Sending iBEC..." log "Sending iBEC..."
$irecovery -f $ramdisk_path/iBEC $irecovery -f $ramdisk_path/iBEC