mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2024-11-27 18:34:14 +01:00
Some changes in SSH part
This commit is contained in:
parent
44174c2d90
commit
dd66193a10
2
resources/ssh_config
Normal file
2
resources/ssh_config
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
StrictHostKeyChecking no
|
||||||
|
UserKnownHostsFile tmp/known_hosts
|
14
restore.sh
14
restore.sh
@ -82,6 +82,9 @@ function Main {
|
|||||||
futurerestore2="resources/tools/futurerestore2_macos"
|
futurerestore2="resources/tools/futurerestore2_macos"
|
||||||
tsschecker="resources/tools/tsschecker_macos"
|
tsschecker="resources/tools/tsschecker_macos"
|
||||||
fi
|
fi
|
||||||
|
SSH="-F resources/ssh_config"
|
||||||
|
SCP="scp $SSH"
|
||||||
|
SSH="ssh $SSH"
|
||||||
|
|
||||||
[[ ! -d resources ]] && Error "resources folder cannot be found. Replace resources folder and try again" "If resources folder is present try removing spaces from path/folder name"
|
[[ ! -d resources ]] && Error "resources folder cannot be found. Replace resources folder and try again" "If resources folder is present try removing spaces from path/folder name"
|
||||||
[[ ! $platform ]] && Error "Platform unknown/not supported."
|
[[ ! $platform ]] && Error "Platform unknown/not supported."
|
||||||
@ -314,11 +317,10 @@ function kDFU {
|
|||||||
Echo "* Reinstall OpenSSH/Dropbear, reboot and rejailbreak, then reinstall them again"
|
Echo "* Reinstall OpenSSH/Dropbear, reboot and rejailbreak, then reinstall them again"
|
||||||
echo
|
echo
|
||||||
Input "Enter the root password of your iOS device when prompted, default is 'alpine'"
|
Input "Enter the root password of your iOS device when prompted, default is 'alpine'"
|
||||||
scp -P 2222 resources/tools/$kloader tmp/pwnediBSS root@127.0.0.1:/
|
$SCP -P 2222 resources/tools/$kloader tmp/pwnediBSS root@127.0.0.1:/tmp
|
||||||
if [ $? == 1 ]; then
|
if [ $? == 1 ]; then
|
||||||
Log "Cannot connect to device via USB SSH."
|
Log "Cannot connect to device via USB SSH."
|
||||||
Echo "* Check your ~/.ssh/known_hosts file. You may also run: rm ~/.ssh/known_hosts"
|
Echo "* Please try the steps above to make sure that SSH is successful"
|
||||||
Echo "* Also try the steps above to make sure that SSH is successful"
|
|
||||||
Input "Press ENTER to continue anyway (or press Ctrl+C to cancel and try again)"
|
Input "Press ENTER to continue anyway (or press Ctrl+C to cancel and try again)"
|
||||||
read -s
|
read -s
|
||||||
Log "Will try again with Wi-Fi SSH..."
|
Log "Will try again with Wi-Fi SSH..."
|
||||||
@ -326,11 +328,11 @@ function kDFU {
|
|||||||
Echo "* You can check for your device's IP Address in: Settings > WiFi/WLAN > tap the 'i' next to your network name"
|
Echo "* You can check for your device's IP Address in: Settings > WiFi/WLAN > tap the 'i' next to your network name"
|
||||||
read -p "$(Input 'Enter the IP Address of your device: ')" IPAddress
|
read -p "$(Input 'Enter the IP Address of your device: ')" IPAddress
|
||||||
Log "Copying stuff to device via SSH..."
|
Log "Copying stuff to device via SSH..."
|
||||||
scp resources/tools/$kloader tmp/pwnediBSS root@$IPAddress:/
|
$SCP resources/tools/$kloader tmp/pwnediBSS root@$IPAddress:/tmp
|
||||||
[ $? == 1 ] && Error "Cannot connect to device via SSH." "Please try the steps above to make sure that SSH is successful"
|
[ $? == 1 ] && Error "Cannot connect to device via SSH." "Please try the steps above to make sure that SSH is successful"
|
||||||
ssh root@$IPAddress "/$kloader /pwnediBSS" &
|
$SSH root@$IPAddress "/tmp/$kloader /tmp/pwnediBSS" &
|
||||||
else
|
else
|
||||||
ssh -p 2222 root@127.0.0.1 "/$kloader /pwnediBSS" &
|
$SSH -p 2222 root@127.0.0.1 "/tmp/$kloader /tmp/pwnediBSS" &
|
||||||
fi
|
fi
|
||||||
Log "Entering kDFU mode..."
|
Log "Entering kDFU mode..."
|
||||||
echo
|
echo
|
||||||
|
Loading…
Reference in New Issue
Block a user