Some fixes

This commit is contained in:
LukeZGD 2021-06-21 19:53:02 +08:00
parent 0a3d69fda3
commit e102281af4
3 changed files with 13 additions and 15 deletions

View File

@ -13,7 +13,7 @@ SetToolPaths() {
python="$(which python2)" python="$(which python2)"
ipwndfu="sudo $python ipwndfu" ipwndfu="sudo $python ipwndfu"
rmsigchks="sudo $python rmsigchks.py" rmsigchks="sudo $python rmsigchks.py"
SimpleHTTPServer="sudo $python -m SimpleHTTPServer 80" SimpleHTTPServer="sudo -b $python -m SimpleHTTPServer 80"
elif [[ $OSTYPE == "darwin"* ]]; then elif [[ $OSTYPE == "darwin"* ]]; then
platform="macos" platform="macos"

View File

@ -141,23 +141,21 @@ CheckM8() {
if [[ $pwnDFUTool == "ipwndfu" ]]; then if [[ $pwnDFUTool == "ipwndfu" ]]; then
cd resources/ipwndfu cd resources/ipwndfu
$ipwndfu -p $ipwndfu -p
elif [[ $pwnDFUTool == "iPwnder32" ]]; then
$ipwnder32 -p
cd resources/ipwndfu
fi
if [[ $DeviceProc == 7 ]]; then if [[ $DeviceProc == 7 ]]; then
Log "Running rmsigchks.py..." Log "Running rmsigchks.py..."
$rmsigchks $rmsigchks
else
Log "Sending iBSS..."
kDFU iBSS || echo
fi
pwnDFUDevice=$? pwnDFUDevice=$?
cd ../.. cd ../..
else elif [[ $pwnDFUTool == "iPwnder32" ]]; then
cd ../.. $ipwnder32 -p
[[ $pwnDFUTool == "ipwndfu" ]] && kDFU iBSS || echo
pwnDFUDevice=$? pwnDFUDevice=$?
fi fi
if [[ $pwnDFUDevice == 1 || $pwnDFUDevice == 255 ]]; then if [[ $pwnDFUDevice != 0 ]]; then
echo -e "\n${Color_R}[Error] Failed to enter pwnDFU mode. Please run the script again: ./restore.sh Downgrade ${Color_N}" echo -e "\n${Color_R}[Error] Failed to enter pwnDFU mode. Please run the script again: ./restore.sh Downgrade ${Color_N}"
echo "${Color_Y}* This step may fail a lot, especially on Linux, and unfortunately there is nothing I can do about the low success rates. ${Color_N}" echo "${Color_Y}* This step may fail a lot, especially on Linux, and unfortunately there is nothing I can do about the low success rates. ${Color_N}"
echo "${Color_Y}* The only option is to make sure you are using an Intel device, and to try multiple times ${Color_N}" echo "${Color_Y}* The only option is to make sure you are using an Intel device, and to try multiple times ${Color_N}"
@ -177,7 +175,7 @@ Recovery() {
FindDevice "Recovery" FindDevice "Recovery"
fi fi
Log "Get ready to enter DFU mode." Echo "Get ready to enter DFU mode."
read -p "$(Input 'Select Y to continue, N to exit recovery (Y/n)')" RecoveryDFU read -p "$(Input 'Select Y to continue, N to exit recovery (Y/n)')" RecoveryDFU
if [[ $RecoveryDFU == 'N' || $RecoveryDFU == 'n' ]]; then if [[ $RecoveryDFU == 'N' || $RecoveryDFU == 'n' ]]; then
Log "Exiting recovery mode." Log "Exiting recovery mode."

View File

@ -179,7 +179,7 @@ Downgrade() {
elif [[ $Jailbreak != 1 && $OSVer != "Other" && $IPSWCustomW != 1 ]]; then elif [[ $Jailbreak != 1 && $OSVer != "Other" && $IPSWCustomW != 1 ]]; then
Log "Preparing for futurerestore... (Enter root password of your PC/Mac when prompted)" Log "Preparing for futurerestore... (Enter root password of your PC/Mac when prompted)"
cd resources cd resources
$SimpleHTTPServer & [[ $platform == "linux" ]] && $SimpleHTTPServer || $SimpleHTTPServer &
ServerRunning=1 ServerRunning=1
cd .. cd ..
fi fi