Update pwnDFU stuff

fixes #336
This commit is contained in:
LukeZGD 2023-10-13 14:11:18 +08:00
parent c8eb22b65f
commit 5a6e3d9f9c

View File

@ -1177,41 +1177,45 @@ device_enter_mode() {
$gaster pwn $gaster pwn
tool_pwned=$? tool_pwned=$?
$gaster reset $gaster reset
elif [[ $device_proc == 6 && $platform != "macos" ]] || [[ $device_type == "iPod2,1" ]]; then elif [[ $platform == "linux" ]]; then
# A6 linux uses ipwndfu if [[ $device_proc == 6 || $device_type == "iPod2,1" ]]; then
# ipod touch 2g uses ipwndfu # ipod touch 2g and A6 linux use ipwndfu
device_ipwndfu pwn device_ipwndfu pwn
elif [[ $device_proc == 4 && $platform != "macos" ]]; then elif [[ $device_proc == 4 ]]; then
# A4 linux uses ipwnder # A4 linux uses ipwnder
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 > 5 )) && [[ $platform == "macos" && $(uname -m) != "x86_64" ]]; then else
# A7 linux uses gaster
log "Placing device to pwnDFU mode using gaster"
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 "* For more details, read the \"Troubleshooting\" wiki page in GitHub"
print "* Troubleshooting links:"
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 "* If pwning gets stuck, you can press Ctrl+C to cancel."
$gaster pwn
tool_pwned=$?
fi
elif (( device_proc > 5 )) && [[ $(uname -m) != "x86_64" ]]; then
# A6/A7 asi mac uses ipwnder_lite # A6/A7 asi mac uses ipwnder_lite
log "Placing device to pwnDFU mode using ipwnder_lite" log "Placing device to pwnDFU mode using ipwnder_lite"
opt="${ipwnder}2 -p" opt="${ipwnder}2 -p"
$opt $opt
tool_pwned=$? tool_pwned=$?
else else
# A4/A6 mac uses ipwnder_lite/ipwnder32 # A4 mac/A6 intel mac uses ipwnder_lite/ipwnder32
# A7 intel mac uses ipwnder_lite/ipwnder32/gaster # A7 intel mac uses ipwnder_lite/ipwnder32/gaster
# A7 linux uses ipwnder/gaster local selection=("ipwnder32" "ipwnder_lite")
input "PwnDFU Tool Option"
print "* Select tool to be used for entering pwned DFU mode."
local selection=()
if [[ $platform == "macos" ]]; then
print "* This option is set to ipwnder32 by default (1). Select this option if unsure."
selection+=("ipwnder32" "ipwnder_lite")
elif [[ $device_proc == 7 ]]; then
print "* This option is set to gaster by default (1). Select this option if unsure."
fi
print "* If the first option does not work, try many times and/or try the other option(s)."
if [[ $device_proc == 7 ]]; then if [[ $device_proc == 7 ]]; then
selection+=("gaster") selection+=("gaster")
fi fi
if [[ $platform != "macos" ]]; then input "PwnDFU Tool Option"
selection+=("ipwnder") print "* Select tool to be used for entering pwned DFU mode."
fi print "* This option is set to ipwnder32 by default (1). Select this option if unsure."
print "* If the first option does not work, try many times and/or try the other option(s)."
input "Select your option:" input "Select your option:"
select opt2 in "${selection[@]}"; do select opt2 in "${selection[@]}"; do
case $opt2 in case $opt2 in
@ -1220,7 +1224,7 @@ device_enter_mode() {
* ) * )
opt="$ipwnder" opt="$ipwnder"
if (( device_proc > 5 )); then if (( device_proc > 5 )); then
opt="${ipwnder}2 -p" opt+="2 -p"
fi fi
break break
;; ;;
@ -1228,15 +1232,10 @@ device_enter_mode() {
done done
log "Placing device to pwnDFU mode using: $opt" log "Placing device to pwnDFU mode using: $opt"
if [[ $device_proc == 7 ]]; then if [[ $device_proc == 7 ]]; then
if [[ $platform == "macos" ]]; then
if [[ $(uname -m) == "x86_64" ]]; then if [[ $(uname -m) == "x86_64" ]]; then
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."
fi fi
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."
elif [[ $platform == "linux" ]]; then
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."
fi
print "* For more details, read the \"Troubleshooting\" wiki page in GitHub" print "* For more details, read the \"Troubleshooting\" wiki page in GitHub"
print "* Troubleshooting links:" print "* Troubleshooting links:"
print " - https://github.com/LukeZGD/Legacy-iOS-Kit/wiki/Troubleshooting" print " - https://github.com/LukeZGD/Legacy-iOS-Kit/wiki/Troubleshooting"