mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2025-02-02 18:22:38 +01:00
Wait for local server for firmware keys
This commit is contained in:
parent
8982122dee
commit
f34f161190
19
restore.sh
19
restore.sh
@ -2670,31 +2670,34 @@ restore_futurerestore() {
|
|||||||
local futurerestore2="$futurerestore"
|
local futurerestore2="$futurerestore"
|
||||||
local mac_ver=0
|
local mac_ver=0
|
||||||
local port=8888
|
local port=8888
|
||||||
|
local opt
|
||||||
|
|
||||||
if [[ $1 == "--use-pwndfu" ]]; then
|
if [[ $1 == "--use-pwndfu" ]]; then
|
||||||
device_fw_key_check
|
device_fw_key_check
|
||||||
if [[ $platform == "macos" ]]; then
|
if [[ $platform == "macos" ]]; then
|
||||||
mac_ver=$(echo "$platform_ver" | cut -c -2)
|
mac_ver=$(echo "$platform_ver" | cut -c -2)
|
||||||
fi
|
fi
|
||||||
log "Starting local server for firmware keys"
|
|
||||||
pushd ../resources >/dev/null
|
pushd ../resources >/dev/null
|
||||||
if [[ $platform == "macos" ]]; then
|
if [[ $platform == "macos" ]]; then
|
||||||
if (( mac_ver >= 12 )); then
|
if (( mac_ver >= 12 )); then
|
||||||
/usr/bin/python3 -m http.server -b 127.0.0.1 $port &
|
opt="/usr/bin/python3 -m http.server -b 127.0.0.1 $port"
|
||||||
httpserver_pid=$!
|
|
||||||
else
|
else
|
||||||
/usr/bin/python -m SimpleHTTPServer $port &
|
opt="/usr/bin/python -m SimpleHTTPServer $port"
|
||||||
httpserver_pid=$!
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [[ -z $(which python3) ]]; then
|
if [[ -z $(which python3) ]]; then
|
||||||
error "Python 3 is not installed, cannot continue. Make sure to have python3 installed."
|
error "Python 3 is not installed, cannot continue. Make sure to have python3 installed."
|
||||||
fi
|
fi
|
||||||
$(which python3) -m http.server -b 127.0.0.1 $port &
|
opt="$(which python3) -m http.server -b 127.0.0.1 $port"
|
||||||
httpserver_pid=$!
|
|
||||||
fi
|
fi
|
||||||
|
log "Starting local server for firmware keys: $opt"
|
||||||
|
$opt &
|
||||||
|
httpserver_pid=$!
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
sleep 1
|
log "Waiting for local server"
|
||||||
|
until [[ $(curl http://127.0.0.1:$port 2>/dev/null) ]]; do
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
restore_download_bbsep
|
restore_download_bbsep
|
||||||
|
Loading…
x
Reference in New Issue
Block a user