-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathJailbreak-Old.sh
executable file
·216 lines (216 loc) · 5.57 KB
/
Jailbreak-Old.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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
#!/bin/bash
set -e
cd support_files/7.1.2/Jailbreak
echo "Establishing Jailbreak Environment (8s)..."
sleep 8
/usr/bin/expect <(cat << EOF
log_user 0
set timeout -1
spawn ssh -o StrictHostKeyChecking=no -p 2022 root@localhost
expect "root@localhost's password:"
send "alpine\r"
expect "sh-4.0#"
send "mount_hfs /dev/disk0s1 /mnt1 \r"
expect "sh-4.0#"
send "mount_hfs /dev/disk0s2s1 /mnt1/private/var \r"
expect "sh-4.0#"
send "exit \r"
expect eof
)
echo "Waiting For Filesystem (5s)..."
sleep 5
echo "Sending Tar and DD..."
sleep 2
/usr/bin/expect <(cat << EOF
set timeout -1
spawn scp -P 2022 tar dd root@localhost:/bin
log_user 0
expect "root@localhost's password:"
send "alpine\r"
expect eof
)
echo "Waiting For Filesystem (5s)..."
sleep 5
echo "Sending Jailbreak Files 1/5..."
/usr/bin/expect <(cat << EOF
set timeout -1
log_user 0
spawn scp -P 2022 panguaxe.tar root@localhost:/mnt1/private/var
expect "root@localhost's password:"
send "alpine\r"
expect eof
)
echo "Sending Jailbreak Files 2/5..."
/usr/bin/expect <(cat << EOF
log_user 0
set timeout -1
spawn scp -P 2022 Cydia.tar root@localhost:/mnt1/private/var
expect "root@localhost's password:"
send "alpine\r"
expect eof
)
echo "Sending Jailbreak Files 3/5..."
/usr/bin/expect <(cat << EOF
log_user 0
set timeout -1
spawn scp -P 2022 APT.tar root@localhost:/mnt1/private/var
expect "root@localhost's password:"
send "alpine\r"
expect eof
)
echo "Sending Jailbreak Files 4/5..."
/usr/bin/expect <(cat << EOF
log_user 0
set timeout -1
spawn scp -P 2022 panguaxe-APT.tar root@localhost:/mnt1/private/var
expect "root@localhost's password:"
send "alpine\r"
expect eof
)
echo "Sending Jailbreak Files 5/5..."
/usr/bin/expect <(cat << EOF
log_user 0
set timeout -1
spawn scp -P 2022 panguaxe root@localhost:/mnt1/private/var
expect "root@localhost's password:"
send "alpine\r"
expect eof
)
echo "Sending Tar and DD..."
/usr/bin/expect <(cat << EOF
log_user 0
set timeout -1
spawn scp -P 2022 tar dd root@localhost:/bin
expect "root@localhost's password:"
send "alpine\r"
expect eof
)
echo "Jailbreaking..."
sleep 2
/usr/bin/expect <(cat << EOF
log_user 0
set timeout -1
spawn ssh -o StrictHostKeyChecking=no -p 2022 root@localhost
expect "root@localhost's password:"
send "alpine\r"
expect "sh-4.0#"
send "tar -x --no-overwrite-dir -f /mnt1/private/var/panguaxe.tar -C /mnt1 \r"
expect "sh-4.0#"
send "tar -x --no-overwrite-dir -f /mnt1/private/var/Cydia.tar -C /mnt1 \r"
expect "sh-4.0#"
send "tar -x --no-overwrite-dir -f /mnt1/private/var/APT.tar -C /mnt1 \r"
expect "sh-4.0#"
send "tar -x --no-overwrite-dir -f /mnt1/private/var/panguaxe-APT.tar -C /mnt1 \r"
expect "sh-4.0#"
send "rm -rf /mnt1/panguaxe \r"
expect "sh-4.0#"
send "cp -a /mnt1/private/var/panguaxe /mnt1 \r"
expect "sh-4.0#"
send "touch /mnt1/panguaxe.installed \r"
expect "sh-4.0#"
send "touch /mnt1/private/var/mobile/Media/panguaxe.installed \r"
expect "sh-4.0#"
send "mkdir -p /mnt1/private/var/root/Media/Cydia/AutoInstall \r"
expect "sh-4.0#"
send "exit \r"
expect eof
)
echo "Sending Debs..."
/usr/bin/expect <(cat << EOF
log_user 0
set timeout -1
spawn scp -P 2022 org.thebigboss.repo.icons_1.0.deb root@localhost:/mnt1/private/var/root/Media/Cydia/AutoInstall
expect "root@localhost's password:"
send "alpine\r"
expect eof
)
/usr/bin/expect <(cat << EOF
log_user 0
set timeout -1
spawn scp -P 2022 com.nyansatan.dualbootstuff_1.0.7a.deb root@localhost:/mnt1/private/var/root/Media/Cydia/AutoInstall
expect "root@localhost's password:"
send "alpine\r"
expect eof
)
/usr/bin/expect <(cat << EOF
log_user 0
set timeout -1
spawn scp -P 2022 cydia_1.1.9_iphoneos-arm.deb root@localhost:/mnt1/private/var/root/Media/Cydia/AutoInstall
expect "root@localhost's password:"
send "alpine\r"
expect eof
)
/usr/bin/expect <(cat << EOF
log_user 0
set timeout -1
spawn scp -P 2022 cydia-lproj_1.1.12_iphoneos-arm.deb root@localhost:/mnt1/private/var/root/Media/Cydia/AutoInstall
expect "root@localhost's password:"
send "alpine\r"
expect eof
)
/usr/bin/expect <(cat << EOF
log_user 0
set timeout -1
spawn scp -P 2022 openssl_0.9.8zg-13_iphoneos-arm.deb root@localhost:/mnt1/private/var/root/Media/Cydia/AutoInstall
expect "root@localhost's password:"
send "alpine\r"
expect eof
)
/usr/bin/expect <(cat << EOF
log_user 0
set timeout -1
spawn scp -P 2022 openssh_6.7p1-13_iphoneos-arm.deb root@localhost:/mnt1/private/var/root/Media/Cydia/AutoInstall
expect "root@localhost's password:"
send "alpine\r"
expect eof
)
/usr/bin/expect <(cat << EOF
log_user 0
set timeout -1
spawn scp -P 2022 coreutils_8.12-13_iphoneos-arm.deb root@localhost:/mnt1/private/var/root/Media/Cydia/AutoInstall
expect "root@localhost's password:"
send "alpine\r"
expect eof
)
echo "Fetching Springboard..."
/usr/bin/expect <(cat << EOF
log_user 0
set timeout -1
spawn scp -P 2022 root@localhost:/mnt1/var/mobile/Library/Preferences/com.apple.springboard.plist $(pwd)
expect "root@localhost's password:"
send "alpine\r"
expect eof
)
echo "Patching Springboard"
plutil -insert SBShowNonDefaultSystemApps -bool YES com.apple.springboard.plist
echo "Sending Springboard"
/usr/bin/expect <(cat << EOF
log_user 0
set timeout -1
spawn scp -P 2022 com.apple.springboard.plist root@localhost:/mnt1/var/mobile/Library/Preferences
expect "root@localhost's password:"
send "alpine\r"
expect eof
)
echo "Patching Fstab..."
/usr/bin/expect <(cat << EOF
log_user 0
set timeout -1
spawn scp -P 2022 fstab root@localhost:/mnt1/etc
expect "root@localhost's password:"
send "alpine\r"
expect eof
)
echo ""
echo "Rebooting..."
/usr/bin/expect <(cat << EOF
log_user 0
set timeout -1
spawn ssh -p 2022 root@localhost
expect "root@localhost's password:"
send "alpine\r"
expect "sh-4.0#"
send "reboot_bak\r"
expect eof
)
echo "Done!"