forked from intelligencegroup-io/iOS-Hacktivation-Toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhacktivation.sh
executable file
·185 lines (149 loc) · 6.04 KB
/
hacktivation.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
#!/bin/bash
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation, either version 3 of the License, or
#(at your option) any later version.
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU General Public License for more details.
#You should have received a copy of the GNU General Public License
#along with this program. If not, see <https://www.gnu.org/licenses/>.
#COLOURS
RED="\033[1;31m"
GREEN="\033[1;32m"
YELLOW="\033[1;33m"
CYAN="\033[0;36m"
NC="\e[0m"
###########################
#ROOT PRIVILEGES
###########################
if [[ $EUID -ne 0 ]]; then
echo -e "$RED You don't have root privileges, execute the script as root.$NC"
exit 1
fi
clear
###########################
# Functions
###########################
# Continue or Exit
function continueOrExit() {
echo ""
read -p "Complete! Back To Menu? [ Y / n ] : " CHECK
if [[ "$CHECK" = "Y" || "$CHECK" = "y" || "$CHECK" = "Yes" || "$CHECK" = "yes" || "$CHECK" = "YES" ]]; then
bash hacktivation.sh
else
echo -e "$RED Program Exit ...$NC"
exit 1
fi
}
###########################
#MENU
###########################
echo -e "$GREEN"
echo " **************************************************"
echo " ************ iOS Hacktivation Toolkit ************"
echo -e " **************************************************$NC"
echo -e " [+] $GREEN Coded by SRS $NC [+]"
echo -e " [+] $GREEN [email protected]$NC [+]"
echo -e " [+]$GREEN Thanks to$NC :$GREEN @exploit3dguy + @appletech752 $NC [+]"
echo -e " [+]$GREEN + @iRogerosx $NC [+]"
ActivationState=$(ideviceinfo | grep ActivationState: | awk '{print $NF}')
MobileEquipmentIdentifier=$(ideviceinfo | grep 'MobileEquipmentIdentifier' | sed "s/^[ \t]*//" | uniq | awk '{print $NF}')
DeviceName=$(ideviceinfo | grep DeviceName | awk '{print $NF}')
UniqueDeviceID=$(ideviceinfo | grep UniqueDeviceID | awk '{print $NF}')
SerialNumber=$(ideviceinfo | grep -w SerialNumber | awk '{print $NF}')
ProductType=$(ideviceinfo | grep ProductType | awk '{print $NF}')
ProductVersion=$(ideviceinfo | grep ProductVersion | awk '{print $NF}')
if test -z "$ActivationState"
then
echo ' --------------------------------------------------'
echo -e "$RED CANNOT CONNECT TO DEVICE$NC "
echo ' --------------------------------------------------'
else
echo ' --------------------------------------------------'
echo -e "$GREEN Activation State : $ActivationState $NC"
echo -e "$GREEN IMEI : $MobileEquipmentIdentifier $NC"
echo -e "$GREEN Device Name : $DeviceName $NC"
echo -e "$GREEN Serial Number : $SerialNumber $NC"
echo -e "$GREEN Device : $ProductType $NC"
echo -e "$GREEN Firmware : $ProductVersion $NC"
echo ' --------------------------------------------------'
fi
echo -e "$YELLOW Select From Menu : $NC"
echo ' --------------------------------------------------'
echo -e "$CYAN 1 : Complete Installation$NC"
echo -e "$CYAN 2 : Factory Reset (Restore iDevice)$NC"
echo -e "$CYAN 3 : Jailbreak (checkra1n)$NC"
echo -e "$CYAN 4 : Bypass iOS 13.0 > | 6S, SE, 7, 8, X$NC"
echo -e "$CYAN 5 : Bypass iOS 12.4.7 | 5S, 6$NC"
echo -e "$CYAN 6 : SSH Shell$NC"
echo -e "$CYAN 0 : Exit$NC"
echo ' --------------------------------------------------'
read -p " Choose > " ch
###########################
#INSTALL
###########################
if [ $ch = 1 ]; then
echo "deb https://assets.checkra.in/debian /" | sudo tee -a /etc/apt/sources.list
apt-key adv --fetch-keys https://assets.checkra.in/debian/archive.key
apt update
apt install -y python libcurl4-openssl-dev libplist-dev libzip-dev openssl libssl-dev libusb-1.0-0-dev libreadline-dev build-essential git make automake libtool pkg-config checkra1n sshpass
git clone 'https://github.com/libimobiledevice/libirecovery'
git clone 'https://github.com/libimobiledevice/idevicerestore'
git clone 'https://github.com/libimobiledevice/usbmuxd'
git clone 'https://github.com/libimobiledevice/libimobiledevice'
git clone 'https://github.com/libimobiledevice/libusbmuxd'
git clone 'https://github.com/libimobiledevice/libplist'
git clone 'https://github.com/rcg4u/iphonessh.git'
cd ./libplist && ./autogen.sh --without-cython && sudo make install && cd ..
cd ./libusbmuxd && ./autogen.sh && sudo make install && cd ..
cd ./libimobiledevice && ./autogen.sh --without-cython && sudo make install && cd ..
cd ./usbmuxd && ./autogen.sh && sudo make install && cd ..
cd ./libirecovery && ./autogen.sh && sudo make install && cd ..
cd ./idevicerestore && ./autogen.sh && sudo make install && cd ..
sudo ldconfig
continueOrExit
###########################
#RESTORE
###########################
elif [ $ch = 2 ]; then
idevicerestore -e -l
continueOrExit
###########################
#CHECKRA1N
###########################
elif [ $ch = 3 ]; then
checkra1n
continueOrExit
###########################
#IOS 13 > MOBILEACTIVATIOND
###########################
elif [ $ch = 4 ]; then
bypass_scripts/mobileactivationd_13_x/./run.sh
continueOrExit
###########################
#IOS 12.4.7 > MOBILEACTIVATIOND
###########################
elif [ $ch = 5 ]; then
bypass_scripts/mobileactivationd_12_4_7/./run.sh
continueOrExit
###########################
#SSH SHELL
###########################
elif [ $ch = 6 ]; then
echo ""
rm ~/.ssh/known_hosts >/dev/null 2>&1
pgrep -f 'tcprelay.py' | xargs kill >/dev/null 2>&1
python iphonessh/python-client/tcprelay.py -t 44:2222 >/dev/null 2>&1 &
sleep 2
sshpass -p 'alpine' ssh -o StrictHostKeyChecking=no root@localhost -p 2222 mount -o rw,union,update /
sshpass -p 'alpine' ssh -o StrictHostKeyChecking=no root@localhost -p 2222
pgrep -f 'tcprelay.py' | xargs kill >/dev/null 2>&1
continueOrExit
elif [ $ch == 0 ]; then
echo -e "$RED Program Exit ...$NC"
exit 1
else
echo "Option not found. Exiting"
fi