diff --git a/resources/depends.sh b/resources/depends.sh index 484f20f..3d0bc18 100755 --- a/resources/depends.sh +++ b/resources/depends.sh @@ -13,7 +13,7 @@ SetToolPaths() { python="$(which python2)" ipwndfu="sudo $python ipwndfu" rmsigchks="sudo $python rmsigchks.py" - SimpleHTTPServer="sudo $python -m SimpleHTTPServer 80" + SimpleHTTPServer="sudo -b $python -m SimpleHTTPServer 80" elif [[ $OSTYPE == "darwin"* ]]; then platform="macos" diff --git a/resources/device.sh b/resources/device.sh index 487f086..7be2fc2 100755 --- a/resources/device.sh +++ b/resources/device.sh @@ -141,23 +141,21 @@ CheckM8() { if [[ $pwnDFUTool == "ipwndfu" ]]; then cd resources/ipwndfu $ipwndfu -p + if [[ $DeviceProc == 7 ]]; then + Log "Running rmsigchks.py..." + $rmsigchks + else + Log "Sending iBSS..." + kDFU iBSS || echo + fi + pwnDFUDevice=$? + cd ../.. elif [[ $pwnDFUTool == "iPwnder32" ]]; then $ipwnder32 -p - cd resources/ipwndfu - fi - - if [[ $DeviceProc == 7 ]]; then - Log "Running rmsigchks.py..." - $rmsigchks - pwnDFUDevice=$? - cd ../.. - else - cd ../.. - [[ $pwnDFUTool == "ipwndfu" ]] && kDFU iBSS || echo pwnDFUDevice=$? 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 "${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}" @@ -177,7 +175,7 @@ Recovery() { FindDevice "Recovery" 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 if [[ $RecoveryDFU == 'N' || $RecoveryDFU == 'n' ]]; then Log "Exiting recovery mode." diff --git a/resources/downgrade.sh b/resources/downgrade.sh index a5c66d1..478a8ba 100755 --- a/resources/downgrade.sh +++ b/resources/downgrade.sh @@ -179,7 +179,7 @@ Downgrade() { elif [[ $Jailbreak != 1 && $OSVer != "Other" && $IPSWCustomW != 1 ]]; then Log "Preparing for futurerestore... (Enter root password of your PC/Mac when prompted)" cd resources - $SimpleHTTPServer & + [[ $platform == "linux" ]] && $SimpleHTTPServer || $SimpleHTTPServer & ServerRunning=1 cd .. fi