Compare commits

3 Commits
main ... linuk

Author SHA1 Message Date
platinumstufff
050b7a4d6d . 2025-06-30 00:22:44 +03:00
platinumstufff
fde54630f5 Update README.md 2025-05-15 23:52:04 +03:00
platinumstufff
e34c569a82 a4 support(probably xd) 2025-05-15 23:51:18 +03:00
19 changed files with 482 additions and 125 deletions

View File

@@ -1,6 +1,6 @@
<h1 align="center">iwannabrute</h1> <h1 align="center">iwannabrute</h1>
<p align="center"> <p align="center">
Bruteforce A5-A6 numeric password with ease. Bruteforce A4-A6 numeric password with ease.
</p> </p>
# Prerequsites # Prerequsites
@@ -34,7 +34,6 @@ The tool will use the AES engine as much as possible with no restrictions at the
# Soon™ # Soon™
- Linux support - Linux support
- A4 support
- Disable password automatically - Disable password automatically
# Other Stuff # Other Stuff

BIN
bin/Darwin/ipwnder Executable file

Binary file not shown.

BIN
bin/Linux/arm64/aespatched Executable file

Binary file not shown.

BIN
bin/Linux/arm64/hfsplus Executable file

Binary file not shown.

BIN
bin/Linux/arm64/iBoot32Patcher Executable file

Binary file not shown.

BIN
bin/Linux/arm64/ipwnder Executable file

Binary file not shown.

BIN
bin/Linux/arm64/irecovery Executable file

Binary file not shown.

BIN
bin/Linux/arm64/jq Executable file

Binary file not shown.

BIN
bin/Linux/arm64/partialZipBrowser Executable file

Binary file not shown.

BIN
bin/Linux/arm64/xpwntool Executable file

Binary file not shown.

BIN
bin/Linux/x86_64/aespatched Executable file

Binary file not shown.

BIN
bin/Linux/x86_64/hfsplus Executable file

Binary file not shown.

BIN
bin/Linux/x86_64/iBoot32Patcher Executable file

Binary file not shown.

BIN
bin/Linux/x86_64/ipwnder Executable file

Binary file not shown.

BIN
bin/Linux/x86_64/irecovery Executable file

Binary file not shown.

BIN
bin/Linux/x86_64/jq Executable file

Binary file not shown.

Binary file not shown.

BIN
bin/Linux/x86_64/xpwntool Executable file

Binary file not shown.

592
start.sh
View File

@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
script_version="1.2.0" script_version="2.0"
mk_bruteforce_ramdisk() { mk_bruteforce_ramdisk() {
device=$1 device=$1
@@ -46,7 +46,7 @@ mk_bruteforce_ramdisk() {
echo Failed to download firmware keys echo Failed to download firmware keys
exit 1 exit 1
fi fi
../../../bin/Darwin/partialZipBrowser -g BuildManifest.plist $ipsw_link &> /dev/null ../../../$dir/partialZipBrowser -g BuildManifest.plist $ipsw_link &> /dev/null
images="iBSS.iBEC.applelogo.DeviceTree.kernelcache.RestoreRamDisk" images="iBSS.iBEC.applelogo.DeviceTree.kernelcache.RestoreRamDisk"
for i in {1..6} for i in {1..6}
@@ -67,37 +67,106 @@ mk_bruteforce_ramdisk() {
echo Downloading $component... echo Downloading $component...
../../../bin/Darwin/partialZipBrowser -g $component $ipsw_link &> /dev/null ../../../$dir/partialZipBrowser -g $component $ipsw_link &> /dev/null
echo Done! echo Done!
if [ "$is_64" = "true" ]; then if [ "$is_64" = "true" ]; then
if [ "$temp_type2" = "RestoreRamDisk" ]; then if [ "$temp_type2" = "RestoreRamDisk" ]; then
../../../bin/Darwin/img4 -i $component -o RestoreRamDisk.raw.dmg ${!iv}${!key} ../../../$dir/img4 -i $component -o RestoreRamDisk.raw.dmg ${!iv}${!key}
if [ "$iOS_Vers" -gt "11" ]; then if [ "$iOS_Vers" -gt "11" ]; then
echo Downloading $component.trustcache... echo Downloading $component.trustcache...
../../../bin/Darwin/partialZipBrowser -g Firmware/$component.trustcache $ipsw_link &> /dev/null ../../../$dir/partialZipBrowser -g Firmware/$component.trustcache $ipsw_link &> /dev/null
echo Done! echo Done!
fi fi
else else
../../../bin/Darwin/img4 -i $temp_type2* -o $temp_type2.raw ${!iv}${!key} ../../../$dir/img4 -i $temp_type2* -o $temp_type2.raw ${!iv}${!key}
fi fi
else else
if [ "$temp_type2" = "RestoreRamDisk" ]; then if [ "$temp_type2" = "RestoreRamDisk" ]; then
../../../bin/Darwin/xpwntool $component RestoreRamDisk.dec.img3 -iv ${!iv} -k ${!key} -decrypt &> /dev/null echo "decrypting $component"
echo "iv=${!iv} key=${!key}"
../../../$dir/xpwntool $component RestoreRamDisk.dec.img3 -iv ${!iv} -k ${!key} -decrypt &> /dev/null
else else
../../../bin/Darwin/xpwntool $temp_type2* $temp_type2.dec.img3 -iv ${!iv} -k ${!key} -decrypt &> /dev/null echo "decrypting $component"
echo "iv=${!iv} key=${!key}"
../../../$dir/xpwntool $temp_type2* $temp_type2.dec.img3 -iv ${!iv} -k ${!key} -decrypt &> /dev/null
fi fi
fi fi
done done
echo "Making ramdisk..." echo "Making ramdisk..."
bootargs="-v amfi=0xff cs_enforcement_disable=1 msgbuf=1048576 wdt=-1" bootargs="-v amfi=0xff cs_enforcement_disable=1 msgbuf=1048576 wdt=-1"
if [ "$is_64" = "true" ]; then
echo "no" if [ "$oscheck" != 'Darwin' ]; then
echo "linak detektet!!!!"
echo "pls work"
../../../$dir/xpwntool RestoreRamDisk.dec.img3 RestoreRamDisk.raw.dmg
sleep 1
echo "1"
../../../$dir/hfsplus grow 30000000 RestoreRamDisk.raw.dmg
echo "2"
../../../$dir/hfsplus RestoreRamDisk.raw.dmg mkdir usr/local/bin
../../../$dir/hfsplus RestoreRamDisk.raw.dmg mkdir usr/bin
../../../$dir/hfsplus RestoreRamDisk.raw.dmg untar ../../../resources/ssh.tar.gz
if [ "$iOS_Vers" -gt 7 ]; then
echo "iOS 8 or later detected, patching restored_external..."
../../../$dir/hfsplus RestoreRamDisk.raw.dmg mv /usr/local/bin/restored_external /usr/local/bin/restored_external.real
../../../$dir/hfsplus RestoreRamDisk.raw.dmg add ../../../resources/setup.sh /usr/local/bin/restored_external
../../../$dir/hfsplus RestoreRamDisk.raw.dmg chmod 755 /usr/local/bin/restored_external
fi
../../../$dir/hfsplus RestoreRamDisk.raw.dmg mv /sbin/reboot /sbin/reboot_bak
../../../$dir/hfsplus RestoreRamDisk.raw.dmg mv /sbin/halt /sbin/halt_bak
../../../$dir/hfsplus RestoreRamDisk.raw.dmg rm /usr/local/bin/restored_external.real
../../../$dir/hfsplus RestoreRamDisk.raw.dmg add ../../../resources/restored_external /usr/local/bin/restored_external.sshrd
../../../$dir/hfsplus RestoreRamDisk.raw.dmg chmod 755 /usr/local/bin/restored_external.sshrd
../../../$dir/hfsplus RestoreRamDisk.raw.dmg add ../../../resources/bruteforce /usr/bin/bruteforce
../../../$dir/hfsplus RestoreRamDisk.raw.dmg add ../../../resources/device_infos /usr/bin/device_infos
../../../$dir/hfsplus RestoreRamDisk.raw.dmg chmod 755 /usr/bin/bruteforce
../../../$dir/hfsplus RestoreRamDisk.raw.dmg chmod 755 /usr/bin/device_infos
../../../$dir/hfsplus RestoreRamDisk.raw.dmg add ../../../resources/setup.sh /usr/local/bin/restored_external
../../../$dir/hfsplus RestoreRamDisk.raw.dmg chmod 755 /usr/local/bin/restored_external
../../../$dir/xpwntool RestoreRamDisk.raw.dmg ramdisk.dmg -t RestoreRamDisk.dec.img3
mv -v ramdisk.dmg ../
../../../$dir/xpwntool iBSS.dec.img3 iBSS.raw
../../../$dir/iBoot32Patcher iBSS.raw iBSS.patched -r
cp iBSS.patched ../pwnediBSS
../../../$dir/xpwntool iBSS.patched iBSS -t iBSS.dec.img3
mv -v iBSS ../
../../../$dir/xpwntool iBEC.dec.img3 iBEC.raw
../../../$dir/iBoot32Patcher iBEC.raw iBEC.patched -r -d -b "rd=md0 $bootargs"
../../../$dir/iBoot32Patcher iBEC.raw iBEC_boot.patched -r -d -b "$bootargs"
../../../$dir/xpwntool iBEC.patched iBEC -t iBEC.dec.img3
../../../$dir/xpwntool iBEC_boot.patched iBEC_boot -t iBEC.dec.img3
mv -v iBEC ../
mv -v iBEC_boot ../
mv -v applelogo.dec.img3 ../applelogo
mv -v DeviceTree.dec.img3 ../devicetree
mv -v kernelcache.dec.img3 ../kernelcache
cd ..
rm -rf work
echo "Patching kernel..."
../../$dir/aespatched kernelcache kernelcache.dec
mv kernelcache kernelcache.orig
../../$dir/xpwntool kernelcache.dec kernelcache -t kernelcache.orig
cd ../../
exit
else else
../../../bin/Darwin/xpwntool RestoreRamDisk.dec.img3 RestoreRamDisk.raw.dmg ../../../$dir/xpwntool RestoreRamDisk.dec.img3 RestoreRamDisk.raw.dmg
hdiutil resize -size 30MB RestoreRamDisk.raw.dmg hdiutil resize -size 30MB RestoreRamDisk.raw.dmg
mkdir ramdisk_mountpoint mkdir ramdisk_mountpoint
sudo hdiutil attach -mountpoint ramdisk_mountpoint/ -owners off RestoreRamDisk.raw.dmg sudo hdiutil attach -mountpoint ramdisk_mountpoint/ -owners off RestoreRamDisk.raw.dmg
@@ -126,18 +195,18 @@ mk_bruteforce_ramdisk() {
hdiutil detach ramdisk_mountpoint hdiutil detach ramdisk_mountpoint
../../../bin/Darwin/xpwntool RestoreRamDisk.raw.dmg ramdisk.dmg -t RestoreRamDisk.dec.img3 ../../../$dir/xpwntool RestoreRamDisk.raw.dmg ramdisk.dmg -t RestoreRamDisk.dec.img3
mv -v ramdisk.dmg ../ mv -v ramdisk.dmg ../
../../../bin/Darwin/xpwntool iBSS.dec.img3 iBSS.raw ../../../$dir/xpwntool iBSS.dec.img3 iBSS.raw
../../../bin/Darwin/iBoot32Patcher iBSS.raw iBSS.patched -r ../../../$dir/iBoot32Patcher iBSS.raw iBSS.patched -r
cp iBSS.patched ../pwnediBSS cp iBSS.patched ../pwnediBSS
../../../bin/Darwin/xpwntool iBSS.patched iBSS -t iBSS.dec.img3 ../../../$dir/xpwntool iBSS.patched iBSS -t iBSS.dec.img3
mv -v iBSS ../ mv -v iBSS ../
../../../bin/Darwin/xpwntool iBEC.dec.img3 iBEC.raw ../../../$dir/xpwntool iBEC.dec.img3 iBEC.raw
../../../bin/Darwin/iBoot32Patcher iBEC.raw iBEC.patched -r -d -b "rd=md0 $bootargs" ../../../$dir/iBoot32Patcher iBEC.raw iBEC.patched -r -d -b "rd=md0 $bootargs"
../../../bin/Darwin/iBoot32Patcher iBEC.raw iBEC_boot.patched -r -d -b "$bootargs" ../../../$dir/iBoot32Patcher iBEC.raw iBEC_boot.patched -r -d -b "$bootargs"
../../../bin/Darwin/xpwntool iBEC.patched iBEC -t iBEC.dec.img3 ../../../$dir/xpwntool iBEC.patched iBEC -t iBEC.dec.img3
../../../bin/Darwin/xpwntool iBEC_boot.patched iBEC_boot -t iBEC.dec.img3 ../../../$dir/xpwntool iBEC_boot.patched iBEC_boot -t iBEC.dec.img3
mv -v iBEC ../ mv -v iBEC ../
mv -v iBEC_boot ../ mv -v iBEC_boot ../
mv -v applelogo.dec.img3 ../applelogo mv -v applelogo.dec.img3 ../applelogo
@@ -148,31 +217,125 @@ mk_bruteforce_ramdisk() {
echo "Patching kernel..." echo "Patching kernel..."
../../bin/Darwin/aespatched kernelcache kernelcache.dec ../../$dir/aespatched kernelcache kernelcache.dec
mv kernelcache kernelcache.orig mv kernelcache kernelcache.orig
../../bin/Darwin/xpwntool kernelcache.dec kernelcache -t kernelcache.orig ../../$dir/xpwntool kernelcache.dec kernelcache -t kernelcache.orig
cd ../../ cd ../../
fi fi
} }
clean() {
kill $httpserver_pid $iproxy_pid $anisette_pid 2>/dev/null
popd &>/dev/null
rm -rf "$(dirname "$0")/tmp$$/"* "$(dirname "$0")/iP"*/ "$(dirname "$0")/tmp$$/" 2>/dev/null
if [[ $platform == "macos" && $(ls "$(dirname "$0")" | grep -v tmp$$ | grep -c tmp) == 0 &&
$no_finder != 1 ]]; then
killall -CONT AMPDevicesAgent AMPDeviceDiscoveryAgent MobileDeviceUpdater
fi
}
clean_sudo() {
clean
sudo rm -rf /tmp/futurerestore /tmp/*.json "$(dirname "$0")/tmp$$/"* "$(dirname "$0")/iP"*/ "$(dirname "$0")/tmp$$/"
sudo kill $sudoloop_pid
}
clean_usbmuxd() {
clean_sudo
if [[ $(ls "$(dirname "$0")" | grep -v tmp$$ | grep -c tmp) != 0 ]]; then
return
fi
sudo killall -9 usbmuxd usbmuxd2 2>/dev/null
sleep 1
if [[ $(command -v systemctl) ]]; then
sudo systemctl restart usbmuxd
elif [[ $(command -v rc-service) ]]; then
sudo rc-service usbmuxd start
fi
}
prepare_udev_rules() {
local owner="$1"
local group="$2"
echo "ACTION==\"add\", SUBSYSTEM==\"usb\", ATTR{idVendor}==\"05ac\", ATTR{idProduct}==\"122[27]|128[0-3]|1338\", OWNER=\"$owner\", GROUP=\"$group\", MODE=\"0660\" TAG+=\"uaccess\"" > 39-libirecovery.rules
}
install_depends() { install_depends() {
echo "Installing dependencies..." echo "Installing dependencies..."
rm -f "../resources/firstrun" rm -f "resources/firstrun"
if [[ $platform == "linux" ]]; then if [[ $platform == "linux" ]]; then
echo "iwannabrute does not support linux at the moment =(." echo "* iwannabrute will be installing dependencies from your distribution's package manager"
echo "* Enter your user password when prompted"
if [[ $distro != "debian" && $distro != "fedora-atomic" ]]; then
echo
echo "Before continuing, make sure that your system is fully updated first!"
echo "${color_Y}* This operation can result in a partial upgrade and may cause breakage if your system is not updated${color_N}"
echo
fi
pause
prepare_udev_rules usbmux plugdev
fi
if [[ $distro == "arch" ]]; then
sudo pacman -Sy --noconfirm --needed base-devel ca-certificates ca-certificates-mozilla curl git ifuse libimobiledevice libxml2 openssh pyenv python udev unzip usbmuxd usbutils vim zenity zip zstd
prepare_udev_rules root storage
elif [[ $distro == "debian" ]]; then
if [[ -n $ubuntu_ver ]]; then
sudo add-apt-repository -y universe
fi
sudo apt update
sudo apt install -m -y build-essential ca-certificates curl git ifuse libssl3 libssl-dev libxml2 libzstd1 openssh-client patch python3 unzip usbmuxd usbutils xxd zenity zip zlib1g-dev
if [[ $(command -v systemctl 2>/dev/null) ]]; then
sudo systemctl enable --now udev systemd-udevd usbmuxd 2>/dev/null
fi
elif [[ $distro == "fedora" ]]; then
sudo dnf install -y ca-certificates git ifuse libimobiledevice libxml2 libzstd openssl openssl-devel patch python3 systemd udev usbmuxd vim-common zenity zip zlib-devel
sudo dnf group install -y c-development
sudo ln -sf /etc/pki/tls/certs/ca-bundle.crt /etc/pki/tls/certs/ca-certificates.crt
prepare_udev_rules root usbmuxd
elif [[ $distro == "fedora-atomic" ]]; then
rpm-ostree install patch vim-common zenity
echo "* You may need to reboot to apply changes with rpm-ostree. Perform a reboot after this before running the script again."
elif [[ $distro == "opensuse" ]]; then
sudo zypper -n install ca-certificates curl git ifuse libimobiledevice-1_0-6 libopenssl-3-devel libxml2 libzstd1 openssl-3 patch pyenv python3 usbmuxd unzip vim zenity zip zlib-devel
sudo zypper -n install -t pattern devel_basis
prepare_udev_rules usbmux usbmux # idk if this is right
elif [[ $distro == "gentoo" ]]; then
sudo emerge -av --noreplace app-arch/zstd app-misc/ca-certificates app-pda/ifuse dev-libs/libxml2 libimobiledevice net-misc/curl openssh python udev unzip usbmuxd usbutils vim zenity zip
elif [[ $distro == "void" ]]; then
sudo xbps-install curl git patch openssh python3 unzip xxd zenity zip base-devel libffi-devel bzip2-devel openssl openssl-devel readline readline-devel sqlite-devel xz liblzma-devel zlib zlib-devel
elif [[ $platform == "macos" ]]; then elif [[ $platform == "macos" ]]; then
echo "* iwannabrute will be installing dependencies and setting up permissions of tools" echo "* iwannabrute will be installing dependencies and setting up permissions of tools"
xattr -cr ./bin/Darwin xattr -cr ../bin/macos
echo "Installing Xcode Command Line Tools" echo "Installing Xcode Command Line Tools"
xcode-select --install xcode-select --install
echo "* Make sure to install requirements from Homebrew/MacPorts: https://github.com/LukeZGD/Legacy-iOS-Kit/wiki/How-to-Use" echo "* Make sure to install requirements from Homebrew/MacPorts: https://github.com/LukeZGD/Legacy-iOS-Kit/wiki/How-to-Use"
pause pause
fi fi
echo "$platform_ver" > "./resources/firstrun"
echo "$platform_ver" > "resources/firstrun"
if [[ $platform == "linux" && $distro != "fedora-atomic" ]]; then
# from linux_fix and libirecovery-rules by Cryptiiiic
if [[ $(command -v systemctl) ]]; then
sudo systemctl enable --now systemd-udevd usbmuxd 2>/dev/null
fi
sudo cp 39-libirecovery.rules /etc/udev/rules.d/39-libirecovery.rules
sudo chown root:root /etc/udev/rules.d/39-libirecovery.rules
sudo chmod 0644 /etc/udev/rules.d/39-libirecovery.rules
sudo udevadm control --reload-rules
sudo udevadm trigger -s usb
fi
echo "Install script done! Please run the script again to proceed" echo "Install script done! Please run the script again to proceed"
echo "If your iOS device is plugged in, unplug and replug your device" echo "If your iOS device is plugged in, unplug and replug your device"
@@ -202,16 +365,158 @@ set_tool_paths() {
the rest of the tools not listed here will be executed using: the rest of the tools not listed here will be executed using:
"$dir/$name_of_tool" "$dir/$name_of_tool"
' '
if [[ $OSTYPE == "darwin"* ]]; then
platform="macos" if [[ $OSTYPE == "linux"* ]]; then
platform_ver="${1:-$(sw_vers -productVersion)}" source /etc/os-release
dir="./bin/Darwin" platform="linux"
platform_ver="$PRETTY_NAME"
dir="bin/Linux/"
# architecture check
if [[ $(uname -m) == "a"* && $(getconf LONG_BIT) == 64 ]]; then
platform_arch="arm64"
elif [[ $(uname -m) == "x86_64" ]]; then
platform_arch="x86_64"
else
error "Your architecture ($(uname -m)) is not supported."
fi
dir+="$platform_arch"
# version check
if [[ -n $UBUNTU_CODENAME ]]; then
case $UBUNTU_CODENAME in
"jammy" | "kinetic" ) ubuntu_ver=22;;
"lunar" | "mantic" ) ubuntu_ver=23;;
"noble" | "oracular" ) ubuntu_ver=24;;
"plucky" | "questing" ) ubuntu_ver=25;;
esac
if [[ -z $ubuntu_ver ]]; then
source /etc/upstream-release/lsb-release 2>/dev/null
ubuntu_ver="$(echo "$DISTRIB_RELEASE" | cut -c -2)"
fi
if [[ -z $ubuntu_ver ]]; then
ubuntu_ver="$(echo "$VERSION_ID" | cut -c -2)"
fi
elif [[ -e /etc/debian_version ]]; then
debian_ver=$(cat /etc/debian_version)
case $debian_ver in
*"sid" | "kali"* ) debian_ver="sid";;
* ) debian_ver="$(echo "$debian_ver" | cut -c -2)";;
esac
elif [[ $ID == "fedora" || $ID_LIKE == "fedora" || $ID == "nobara" ]]; then
fedora_ver=$VERSION_ID
fi
platform_arch="$(uname -m)" platform_arch="$(uname -m)"
if [[ $platform_arch == "arm64" ]]; then if [[ $platform_arch == "arm64" ]]; then
echo "Please note that arm64 macs are semi-untested." dir+="/arm64"
fi fi
# distro check
if [[ $ID == "arch" || $ID_LIKE == "arch" || $ID == "artix" ]]; then
distro="arch"
elif (( ubuntu_ver >= 22 )) || (( debian_ver >= 12 )) || [[ $debian_ver == "sid" ]]; then
distro="debian"
elif (( fedora_ver >= 37 )); then
distro="fedora"
if [[ $(command -v rpm-ostree) ]]; then
distro="fedora-atomic"
fi
elif [[ $ID == "opensuse-tumbleweed" ]]; then
distro="opensuse"
elif [[ $ID == "gentoo" || $ID_LIKE == "gentoo" || $ID == "pentoo" ]]; then
distro="gentoo"
elif [[ $ID == "void" ]]; then
distro="void"
elif [[ -n $ubuntu_ver || -n $debian_ver || -n $fedora_ver ]]; then
error "Your distro version ($platform_ver - $platform_arch) is not supported. See the repo README for supported OS versions/distros"
else
echo "Your distro ($platform_ver - $platform_arch) is not detected/supported. See the repo README for supported OS versions/distros"
echo "* You may still continue, but you will need to install required packages and libraries manually as needed."
sleep 5
pause
fi
# live cd/usb check
if [[ $(id -u $USER) == 999 || $USER == "liveuser" ]]; then
live_cdusb=1
live_cdusb_str="Live session"
"Linux Live session detected."
if [[ $(pwd) == "/home"* ]]; then
df . -h
if [[ $(lsblk -o label | grep -c "casper-rw") == 1 || $(lsblk -o label | grep -c "persistence") == 1 ]]; then
echo "Detected iwannabrute running on persistent storage."
live_cdusb_str+=" - Persistent storage"
else
echo "Detected iwannabrute running on temporary storage."
echo "* You may run out of space and get errors during the restore process."
echo "* Please move iwannabrute to a drive that is NOT used for the live USB."
echo "* This may mean using another external HDD/flash drive to store iwannabrute on."
echo "* To use one USB drive only, create the live USB using Rufus with Persistent Storage enabled."
sleep 5
pause
live_cdusb_str+=" - Temporary storage"
fi
fi
fi
# if "/media" is detected in pwd, echo user of possible permission issues
if [[ $(pwd) == *"/media"* ]]; then
echo "You might get permission errors like \"Permission denied\" on getting device info."
echo "* If this is the case, try moving iwannabrute to the Desktop or Documents folder."
fi
if [[ -z $device_disable_sudoloop ]]; then
device_sudoloop=1 # Run some tools as root for device detection if set to 1. (for Linux)
trap "clean_sudo" EXIT
fi
if [[ $(uname -m) == "a"* || $device_sudoloop == 1 || $live_cdusb == 1 ]]; then
if [[ $live_cdusb != 1 ]]; then
echo "* Enter your user password when prompted"
fi
sudo -v
(while true; do sudo -v; sleep 60; done) &
sudoloop_pid=$!
futurerestore="sudo "
gaster="sudo "
idevicerestore="sudo "
ipwnder="sudo "
irecovery="sudo "
irecovery2="sudo "
irecovery3="sudo "
if [[ ! -d $dir && $(ls ../bin/Linux) ]]; then
echo "Running on platform: $platform ($platform_ver - $platform_arch)"
error "Failed to find bin directory for $platform_arch, found $(ls -x ../bin/Linux) instead." \
"* Download the \"Linux_$platform_arch\" or \"complete\" version to continue (or do a git clone)"
fi
trap "clean_usbmuxd" EXIT
if [[ $othertmp == 0 ]]; then
if [[ $(command -v systemctl) ]]; then
sudo systemctl stop usbmuxd
elif [[ $(command -v rc-service) ]]; then
sudo rc-service usbmuxd zap
else
sudo killall -9 usbmuxd usbmuxd2 2>/dev/null
fi
#sudo killall usbmuxd 2>/dev/null
#sleep 1
elif [[ $othertmp != 0 ]]; then
echo "Detected existing tmp folder(s), there might be other iwannabrute instance(s) running"
echo "Not running usbmuxd"
fi
fi
gaster+="$dir/gaster"
elif [[ $(uname -m) == "iP"* ]]; then
error "Running iwannabrute on iOS is not supported (yet)" "* Supported platforms: Linux, macOS"
elif [[ $OSTYPE == "darwin"* ]]; then
platform="macos"
platform_ver="${1:-$(sw_vers -productVersion)}"
dir="../bin/macos"
# macos version check # macos version check
mac_majver="${platform_ver:0:2}" mac_majver="${platform_ver:0:2}"
if [[ $mac_majver == 10 ]]; then if [[ $mac_majver == 10 ]]; then
@@ -219,29 +524,72 @@ set_tool_paths() {
mac_minver=${mac_minver%.*} mac_minver=${mac_minver%.*}
# go here if need to disable os x 10.11 support for now # go here if need to disable os x 10.11 support for now
if (( mac_minver < 11 )); then if (( mac_minver < 11 )); then
warn "Your macOS version ($platform_ver - $platform_arch) is not supported. Expect features to not work properly." echo "Your macOS version ($platform_ver - $platform_arch) is not supported. Expect features to not work properly."
print "* Supported versions are macOS 10.11 and newer. (10.12 and newer recommended)" echo "* Supported macOS versions are 10.11 and newer. (10.12 and newer recommended)"
pause pause
fi fi
if (( mac_minver <= 11 )); then
mac_cocoa=1
if [[ -z $(command -v cocoadialog) ]]; then
local error_msg="* You need to install cocoadialog from MacPorts."
error_msg+=$'\n* Please read the wiki and install the requirements needed in MacPorts: https://github.com/LukeZGD/Legacy-iOS-Kit/wiki/How-to-Use'
error_msg+=$'\n* Also make sure that /opt/local/bin (or /usr/local/bin) is in your $PATH.'
error_msg+=$'\n* You may try running this command: export PATH="/opt/local/bin:$PATH"'
error "Cannot find cocoadialog, cannot continue." "$error_msg"
fi fi
fi
if [[ $(command -v curl) == "/usr/bin/curl" ]] && (( mac_minver < 15 )); then
local error_msg="* You need to install curl from MacPorts."
error_msg+=$'\n* Please read the wiki and install the requirements needed in MacPorts: https://github.com/LukeZGD/Legacy-iOS-Kit/wiki/How-to-Use'
error_msg+=$'\n* Also make sure that /opt/local/bin (or /usr/local/bin) is in your $PATH.'
error_msg+=$'\n* You may try running this command: export PATH="/opt/local/bin:$PATH"'
error "Outdated curl detected, cannot continue." "$error_msg"
fi
case $mac_minver in
11 ) mac_name="El Capitan";;
12 ) mac_name="Sierra";;
13 ) mac_name="High Sierra";;
14 ) mac_name="Mojave";;
15 ) mac_name="Catalina";;
esac
fi
case $mac_majver in
11 ) mac_name="Big Sur";;
12 ) mac_name="Monterey";;
13 ) mac_name="Ventura";;
14 ) mac_name="Sonoma";;
15 ) mac_name="Sequoia";;
esac
if [[ -n $mac_name ]]; then
platform_ver="$mac_name $platform_ver"
fi
bspatch="$(command -v bspatch)"
cocoadialog="$(command -v cocoadialog)"
gaster+="../bin/macos/gaster"
ipwnder32="$dir/ipwnder32"
PlistBuddy="/usr/libexec/PlistBuddy"
sha1sum="$(command -v shasum) -a 1"
tsschecker="../bin/macos/tsschecker"
zenity="../bin/macos/zenity"
scp2="/usr/bin/scp"
ssh2="/usr/bin/ssh"
# kill macos daemons # kill macos daemons
killall -STOP AMPDevicesAgent AMPDeviceDiscoveryAgent MobileDeviceUpdater killall -STOP AMPDevicesAgent AMPDeviceDiscoveryAgent MobileDeviceUpdater
else else
echo "Your platform ($OSTYPE) is not supported." "* Supported platforms: macOS" error "Your platform ($OSTYPE) is not supported." "* Supported platforms: Linux, macOS"
exit
fi fi
echo "Running on platform: $platform ($platform_ver - $platform_arch)" echo "Running on platform: $platform ($platform_ver - $platform_arch)"
if [[ ! -d $dir ]]; then if [[ ! -d $dir ]]; then
echo "Failed to find bin directory ($dir), cannot continue." \ error "Failed to find bin directory ($dir), cannot continue." \
"* Git clone iwannabrute again" "* Re-download iwannabrute from releases (or do a git clone/reset)"
fi fi
if [[ $device_sudoloop == 1 ]]; then if [[ $device_sudoloop == 1 ]]; then
sudo chmod +x $dir/* sudo chmod +x $dir/*
if [[ $? != 0 ]]; then if [[ $? != 0 ]]; then
echo "Failed to set up execute permissions of binaries, cannot continue. Try to move iwannabrute somewhere else." error "Failed to set up execute permissions of binaries, cannot continue. Try to move iwannabrute somewhere else."
fi fi
else else
chmod +x $dir/* chmod +x $dir/*
@@ -256,22 +604,9 @@ set_tool_paths() {
ifuse="$(command -v ifuse)" ifuse="$(command -v ifuse)"
ipwnder+="$dir/ipwnder" ipwnder+="$dir/ipwnder"
irecovery+="$dir/irecovery" irecovery+="$dir/irecovery"
irecovery2+="$dir/irecovery2"
irecovery3+="../$dir/irecovery"
jq="$dir/jq" jq="$dir/jq"
if [[ $(ssh -V 2>&1 | grep -c SSH_8.8) == 1 || $(ssh -V 2>&1 | grep -c SSH_8.9) == 1 ||
$(ssh -V 2>&1 | grep -c SSH_9.) == 1 || $(ssh -V 2>&1 | grep -c SSH_1) == 1 ]]; then
echo " PubkeyAcceptedAlgorithms +ssh-rsa" >> ssh_config
elif [[ $(ssh -V 2>&1 | grep -c SSH_6) == 1 ]]; then
cat ./resources/ssh_config | sed "s,Add,#Add,g" | sed "s,HostKeyA,#HostKeyA,g" > ssh_config
fi
scp2+=" -F ./ssh_config"
ssh2+=" -F ./ssh_config"
} }
check_ramdisk_cache(){ check_ramdisk_cache(){
ramdisk_path="ramdisks/bruteforce-$deviceid-$ios_version" ramdisk_path="ramdisks/bruteforce-$deviceid-$ios_version"
@@ -297,24 +632,19 @@ check_ramdisk_cache(){
} }
pwn_device() { pwn_device() {
if [ "$is_fake_device" = true ]; then if [ "$is_fake_device" = true ]; then
echo "device is fake, exiting" echo "device is fake, exiting"
exit exit
fi fi
# check if device in pwndfu already
if [[ -z "${is_a5+x}" ]]; then if (system_profiler SPUSBDataType 2> /dev/null | grep ' Apple Mobile Device (DFU Mode)' >> /dev/null | $dir/irecovery -q 2> /dev/null | grep 'PWND' >> /dev/null); then
echo "Detected $device_name ($deviceid)." echo "Device already in pwnDFU mode."
if (system_profiler SPUSBDataType 2> /dev/null | grep ' Apple Mobile Device (DFU Mode)' >> /dev/null | bin/Darwin/irecovery -q 2> /dev/null | grep 'PWND' >> /dev/null); then
echo "Device already in pwnDFU. Continuing..."
ipwndfu send_ibss ipwndfu send_ibss
else
case $pwnder in
"ipwndfu") ipwndfu pwn ;;
esac
fi fi
else #pwndfu code
case $pwnder in
a5)
echo "" echo ""
echo "" echo ""
echo "Detected A5 device." echo "Detected A5 device."
@@ -322,18 +652,30 @@ pwn_device() {
echo "Use LukeZGD fork of checkm8-a5: https://github.com/LukeZGD/checkm8-a5" echo "Use LukeZGD fork of checkm8-a5: https://github.com/LukeZGD/checkm8-a5"
echo "You may also use checkm8-a5 for the Pi Pico: https://www.reddit.com/r/LegacyJailbreak/comments/1djuprf/working_checkm8a5_on_the_raspberry_pi_pico/" echo "You may also use checkm8-a5 for the Pi Pico: https://www.reddit.com/r/LegacyJailbreak/comments/1djuprf/working_checkm8a5_on_the_raspberry_pi_pico/"
echo "Pwn device using checkm8-a5 and then connect it." echo "Pwn device using checkm8-a5 and then connect it."
if ! (system_profiler SPUSBDataType 2> /dev/null | grep ' Apple Mobile Device (DFU Mode)' >> /dev/null | bin/Darwin/irecovery -q 2> /dev/null | grep 'PWND' >> /dev/null); then if ! (system_profiler SPUSBDataType 2> /dev/null | grep ' Apple Mobile Device (DFU Mode)' >> /dev/null | $dir/irecovery -q 2> /dev/null | grep 'PWND' >> /dev/null); then
echo "[*] Waiting for device in pwnDFU mode" echo "[*] Waiting for device in pwnDFU mode"
fi fi
while ! (system_profiler SPUSBDataType 2> /dev/null | grep ' Apple Mobile Device (DFU Mode)' >> /dev/null | bin/Darwin/irecovery -q 2> /dev/null | grep 'PWND' >> /dev/null ); do while ! (system_profiler SPUSBDataType 2> /dev/null | grep ' Apple Mobile Device (DFU Mode)' >> /dev/null | $dir/irecovery -q 2> /dev/null | grep 'PWND' >> /dev/null ); do
sleep 1 sleep 1
done done
echo "Device in pwnDFU mode detected!" echo "Device in pwnDFU mode detected!"
ipwndfu send_ibss ipwndfu send_ibss
fi ;;
ipwndfu)
echo "Using ipwndu for pwning..."
ipwndfu pwn
;;
ipwnder32)
echo "Using ipwnder for pwning..."
ipwnder
;;
*)
echo "pwnder value is empty. wtf"
exit 1
;;
esac
} }
ipwndfu() { ipwndfu() {
@@ -457,6 +799,7 @@ ipwndfu() {
} }
download_file() { download_file() {
# usage: download_file {link} {target location} {sha1} # usage: download_file {link} {target location} {sha1}
local filename="$(basename $2)" local filename="$(basename $2)"
@@ -479,7 +822,7 @@ get_device_info() {
fake_deviceid="" fake_deviceid=""
for arg in "$@"; do for arg in "$@"; do
case $arg in case $arg in
fake-deviceid=*) fake-device*)
fake_deviceid="${arg#*=}" fake_deviceid="${arg#*=}"
;; ;;
esac esac
@@ -489,41 +832,53 @@ get_device_info() {
is_fake_device=true is_fake_device=true
deviceid="$fake_deviceid" deviceid="$fake_deviceid"
else else
if ! (system_profiler SPUSBDataType 2> /dev/null | grep ' Apple Mobile Device (DFU Mode)' > /dev/null); then if [ "$oscheck" = 'Darwin' ]; then
if ! (system_profiler SPUSBDataType 2> /dev/null | grep ' Apple Mobile Device (DFU Mode)' >> /dev/null); then
echo "[*] Waiting for device in DFU mode" echo "[*] Waiting for device in DFU mode"
fi fi
while ! (system_profiler SPUSBDataType 2> /dev/null | grep ' Apple Mobile Device (DFU Mode)' > /dev/null); do while ! (system_profiler SPUSBDataType 2> /dev/null | grep ' Apple Mobile Device (DFU Mode)' >> /dev/null); do
sleep 1 sleep 1
done done
else
if ! (lsusb 2> /dev/null | grep ' Apple, Inc. Mobile Device (DFU Mode)' >> /dev/null); then
echo "[*] Waiting for device in DFU mode"
fi
deviceid=$(bin/Darwin/irecovery -q | grep PRODUCT | sed 's/PRODUCT: //') while ! (lsusb 2> /dev/null | grep ' Apple, Inc. Mobile Device (DFU Mode)' >> /dev/null); do
sleep 1
done
fi
deviceid=$($dir/irecovery -q | grep PRODUCT | sed 's/PRODUCT: //')
fi fi
case $deviceid in case $deviceid in
# "iPhone3,1") device_name="iPhone 4 (GSM)" pwnder="ipwnder32" ;; "iPhone3,1") device_name="iPhone 4 (GSM)" default_version="7.1.2" pwnder="ipwnder32" ;;
# "iPhone3,2") device_name="iPhone 4 (GSM, Rev A)" pwnder="ipwnder32" ;; "iPhone3,2") device_name="iPhone 4 (GSM, Rev A)" default_version="7.1.2" pwnder="ipwnder32" ;;
# "iPhone3,3") device_name="iPhone 4 (CDMA)" pwnder="ipwnder32";; "iPhone3,3") device_name="iPhone 4 (CDMA)" default_version="7.1.2" pwnder="ipwnder32";;
"iPhone4,1") device_name="iPhone 4S" is_a5=true;; "iPhone4,1") device_name="iPhone 4S" default_version="9.0.2" pwnder="a5";;
"iPhone5,1") device_name="iPhone 5 (GSM)" pwnder="ipwndfu";; "iPhone5,1") device_name="iPhone 5 (GSM)" default_version="9.0.2" pwnder="ipwndfu";;
"iPhone5,2") device_name="iPhone 5 (Global)" pwnder="ipwndfu";; "iPhone5,2") device_name="iPhone 5 (Global)" default_version="9.0.2" pwnder="ipwndfu";;
"iPhone5,3") device_name="iPhone 5C (GSM)" pwnder="ipwndfu";; "iPhone5,3") device_name="iPhone 5C (GSM)" default_version="9.0.2" pwnder="ipwndfu";;
"iPhone5,4") device_name="iPhone 5C (Global)" pwnder="ipwndfu";; "iPhone5,4") device_name="iPhone 5C (Global)" default_version="9.0.2" pwnder="ipwndfu";;
# "iPad1,1") device_name="iPad 1" pwnder="ipwnder32";; # Disabled due iOS 5.1.1 is last version for iPad 1(aes patch needs to be reworked)
"iPad2,1") device_name="iPad 2 (Wi-Fi)" is_a5=true;; # "iPad1,1") device_name="iPad 1" default_version="5.1.1" pwnder="ipwnder32";;
"iPad2,2") device_name="iPad 2 (GSM)" is_a5=true;; "iPad1,1") echo "iPad 1st support is disabled"; exit;;
"iPad2,3") device_name="iPad 2 (CDMA)" is_a5=true;; "iPad2,1") device_name="iPad 2 (Wi-Fi)" default_version="9.0.2" pwnder="a5";;
"iPad2,4") device_name="iPad 2 (Wi-Fi, Rev A)" is_a5=true;; "iPad2,2") device_name="iPad 2 (GSM)" default_version="9.0.2" pwnder="a5";;
"iPad2,5") device_name="iPad mini 1 (Wi-Fi)" is_a5=true;; "iPad2,3") device_name="iPad 2 (CDMA)" default_version="9.0.2" pwnder="a5";;
"iPad2,6") device_name="iPad mini 1 (GSM)" is_a5=true;; "iPad2,4") device_name="iPad 2 (Wi-Fi, Rev A)" default_version="9.0.2" pwnder="a5";;
"iPad2,7") device_name="iPad mini 1 (Global)" is_a5=true;; "iPad2,5") device_name="iPad mini 1 (Wi-Fi)" default_version="9.0.2" pwnder="a5";;
"iPad3,1") device_name="iPad 3 (Wi-Fi)" is_a5=true;; "iPad2,6") device_name="iPad mini 1 (GSM)" default_version="9.0.2" pwnder="a5";;
"iPad3,2") device_name="iPad 3 (CDMA)" is_a5=true;; "iPad2,7") device_name="iPad mini 1 (Global)" default_version="9.0.2" pwnder="a5";;
"iPad3,3") device_name="iPad 3 (GSM)" is_a5=true;; "iPad3,1") device_name="iPad 3 (Wi-Fi)" default_version="9.0.2" pwnder="a5";;
"iPad3,4") device_name="iPad 4 (Wi-Fi)" pwnder="ipwndfu";; "iPad3,2") device_name="iPad 3 (CDMA)" default_version="9.0.2" pwnder="a5";;
"iPad3,5") device_name="iPad 4 (GSM)" pwnder="ipwndfu";; "iPad3,3") device_name="iPad 3 (GSM)" default_version="9.0.2" pwnder="a5";;
"iPad3,6") device_name="iPad 4 (Global)" pwnder="ipwndfu";; "iPad3,4") device_name="iPad 4 (Wi-Fi)" default_version="9.0.2" pwnder="ipwndfu";;
"iPod4,1") device_name="iPod touch 4" is_a5=true;; "iPad3,5") device_name="iPad 4 (GSM)" default_version="9.0.2" pwnder="ipwndfu";;
"iPod5,1") device_name="iPod touch 5" is_a5=true;; "iPad3,6") device_name="iPad 4 (Global)" default_version="9.0.2" pwnder="ipwndfu";;
"iPod4,1") device_name="iPod touch 4" default_version="6.1.6" pwnder="ipwnder32";;
"iPod5,1") device_name="iPod touch 5" default_version="9.0.2" pwnder="a5";;
*) device_name="Unsupported device" unsupported=true;; *) device_name="Unsupported device" unsupported=true;;
esac esac
if [[ -z "${unsupported+x}" ]]; then if [[ -z "${unsupported+x}" ]]; then
@@ -540,34 +895,34 @@ send_ramdisk() {
cd ramdisks/bruteforce-$deviceid-$ios_version cd ramdisks/bruteforce-$deviceid-$ios_version
sleep 3 sleep 3
echo "Sending iBSS..." echo "Sending iBSS..."
../../bin/Darwin/irecovery -f iBSS ../../$dir/irecovery -f iBSS
sleep 1 sleep 1
echo "Sending iBEC..." echo "Sending iBEC..."
../../bin/Darwin/irecovery -f iBEC ../../$dir/irecovery -f iBEC
sleep 3 sleep 3
../../bin/Darwin/irecovery -c "bgcolor 0 255 255" ../../$dir/irecovery -c "bgcolor 0 255 255"
sleep 1 sleep 1
echo "Sending device tree..." echo "Sending device tree..."
../../bin/Darwin/irecovery -f devicetree ../../$dir/irecovery -f devicetree
../../bin/Darwin/irecovery -c devicetree ../../$dir/irecovery -c devicetree
sleep 1 sleep 1
echo "Sending ramdisk..." echo "Sending ramdisk..."
../../bin/Darwin/irecovery -f ramdisk.dmg ../../$dir/irecovery -f ramdisk.dmg
../../bin/Darwin/irecovery -c ramdisk ../../$dir/irecovery -c ramdisk
sleep 1 sleep 1
echo "Sending kernelcache..." echo "Sending kernelcache..."
../../bin/Darwin/irecovery -f kernelcache ../../$dir/irecovery -f kernelcache
echo "Booting device now..." echo "Booting device now..."
../../bin/Darwin/irecovery -c bootx ../../$dir/irecovery -c bootx
echo "" echo ""
echo "Device should show text on screen now." echo "Device should show text on screen now."
echo "After passcode is found please reboot using home + power button." echo "After passcode is found please reboot using home + power button."
@@ -603,7 +958,7 @@ version_check() {
version_update_check() { version_update_check() {
pushd "$(dirname "$0")/tmp$$" >/dev/null pushd "$(dirname "$0")/tmp$$" >/dev/null
if [[ $platform == "macos" && ! -e ./resources/firstrun ]]; then if [[ $platform == "macos" && ! -e ./resources/firstrun ]]; then
xattr -cr ./bin/Darwin/Darwin xattr -cr ./$dir/Darwin
fi fi
echo "Checking for updates..." echo "Checking for updates..."
github_api=$(curl https://api.github.com/repos/platinumstufff/iwannabrute/latest 2>/dev/null) github_api=$(curl https://api.github.com/repos/platinumstufff/iwannabrute/latest 2>/dev/null)
@@ -617,33 +972,33 @@ version_update() {
local req local req
select_yesno "Do you want to update now?" 1 select_yesno "Do you want to update now?" 1
if [[ $? != 1 ]]; then if [[ $? != 1 ]]; then
log "User selected N, cannot continue. Exiting." echo "User selected N, cannot continue. Exiting."
exit exit
fi fi
if [[ -d .git ]]; then if [[ -d .git ]]; then
log "Running git pull..." echo "Running git pull..."
print "* If this fails for some reason, run: git reset --hard" echo "* If this fails for some reason, run: git reset --hard"
print "* To clean more files if needed, run: git clean -df" echo "* To clean more files if needed, run: git clean -df"
git pull git pull
pushd "$(dirname "$0")/tmp$$" >/dev/null pushd "$(dirname "$0")/tmp$$" >/dev/null
log "Done! Please run the script again" echo "Done! Please run the script again"
exit exit
elif (( $(ls bin | wc -l) > 1 )); then elif (( $(ls bin | wc -l) > 1 )); then
req=".assets[] | select (.name|test(\"complete\")) | .browser_download_url" req=".assets[] | select (.name|test(\"complete\")) | .browser_download_url"
elif [[ $platform == "linux" ]]; then elif [[ $platform == "Linux" ]]; then
req=".assets[] | select (.name|test(\"${platform}_$platform_arch\")) | .browser_download_url" req=".assets[] | select (.name|test(\"${platform}_$platform_arch\")) | .browser_download_url"
else else
req=".assets[] | select (.name|test(\"${platform}\")) | .browser_download_url" req=".assets[] | select (.name|test(\"${platform}\")) | .browser_download_url"
fi fi
pushd "$(dirname "$0")/tmp$$" >/dev/null pushd "$(dirname "$0")/tmp$$" >/dev/null
url="$(echo "$github_api" | $jq -r "$req")" url="$(echo "$github_api" | $jq -r "$req")"
log "Downloading: $url" echo "Downloading: $url"
curl -L $url -o latest.zip curl -L $url -o latest.zip
if [[ ! -s latest.zip ]]; then if [[ ! -s latest.zip ]]; then
error "Download failed. Please run the script again" error "Download failed. Please run the script again"
fi fi
popd >/dev/null popd >/dev/null
log "Updating..." echo "Updating..."
cp resources/firstrun tmp$$ 2>/dev/null cp resources/firstrun tmp$$ 2>/dev/null
rm -r bin/ LICENSE README.md restore.sh rm -r bin/ LICENSE README.md restore.sh
if [[ $device_sudoloop == 1 ]]; then if [[ $device_sudoloop == 1 ]]; then
@@ -653,7 +1008,7 @@ version_update() {
unzip -q tmp$$/latest.zip -d . unzip -q tmp$$/latest.zip -d .
cp tmp$$/firstrun resources 2>/dev/null cp tmp$$/firstrun resources 2>/dev/null
pushd "$(dirname "$0")/tmp$$" >/dev/null pushd "$(dirname "$0")/tmp$$" >/dev/null
log "Done! Please run the script again" echo "Done! Please run the script again"
exit exit
} }
@@ -744,9 +1099,10 @@ done
if [[ ! -e "./resources/firstrun" || $(cat "./resources/firstrun") != "$platform_ver" || $check_fail == 1 ]]; then if [[ ! -e "./resources/firstrun" || $(cat "./resources/firstrun") != "$platform_ver" || $check_fail == 1 ]]; then
install_depends install_depends
fi fi
get_device_info "$@" get_device_info "$@"
echo "" echo ""
echo "Enter ramdisk version (9.0.2 is default)" echo "Enter ramdisk version ($default_version is default)"
echo "" echo ""
read -p "Version:" ios_version read -p "Version:" ios_version
major="${ios_version%%.*}" major="${ios_version%%.*}"
@@ -754,7 +1110,7 @@ if [ "$major" = "10" ]; then
echo "For iOS 10.x devices use 9.0.2 ramdisk." echo "For iOS 10.x devices use 9.0.2 ramdisk."
exit exit
fi fi
ios_version=${ios_version:-9.0.2} ios_version="${ios_version:-$default_version}"
echo "" echo ""
echo "Checking is Ramdisk exists." echo "Checking is Ramdisk exists."
@@ -774,6 +1130,8 @@ pwn_device
send_ramdisk send_ramdisk
} }
othertmp=$(ls "$(dirname "$0")" | grep -c tmp) othertmp=$(ls "$(dirname "$0")" | grep -c tmp)
pushd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null pushd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null