This repository has been archived by the owner on Feb 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
dumpblobs
executable file
·92 lines (80 loc) · 2.3 KB
/
dumpblobs
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
#!/bin/bash
if [ $# -lt 2 ]; then
echo ""
echo "[DESCRIPTION]"
echo "Sends pwned iBEC to device in kDFU mode and then dumps onboard blobs"
echo ""
echo "[USAGE]"
echo "./dumpblobs <device model> <ios version>"
echo ""
echo "[EXAMPLES]"
echo "./dumpblobs iPad3,5 7.1.2"
echo "./dumpblobs iPod5,1 9.1"
echo "./dumpblobs iPhone4,1 6.0.1"
echo ""
exit
fi
if [ $# -gt 2 ]; then
echo "[ERROR] Too many arguments"
exit
fi
# if [ $OSTYPE = msys ]; then
# echo "Windows Detected"
# path="/c/Users/`whoami`/Downloads"
# platform="win"
# desktop="/c/Users/`whoami`/Desktop"
if [[ $OSTYPE == "darwin"* ]]; then
echo "macOS Detected"
if [ `date '+%Y'` != "2012" ]; then
echo -e "******\nPlease set the System Date to the year 2012, then run again!\n******"
exit
fi
path="/Users/`whoami`/Downloads"
platform="macos"
desktop="/Users/`whoami`/Desktop"
else
echo "Not supported"
exit
fi
model=$1
ios=$2
echo "iOS Version: $2"
echo "Model: $model"
cd "$path/blobs/odysseus-0.999.0/$platform/"
echo "Will attempt to send iBEC"
echo ""
./irecovery -f pwnediBEC
echo "Continuing in 16 seconds..."
echo "******"
echo "UNPLUG THEN RECONNECT DEVICE TO COMPUTER NOW"
echo "******"
sleep 16
if [ $platform = "macos" ]; then
echo "Sending commands to device"
(echo -e "/send ../payload\ngo blobs\n/exit") | ./irecovery -s
echo ""
sleep 1
./irecovery -g myblob.dump
echo "Rebooting device"
sleep 1
./irecovery -c reboot
echo ""
sleep 1
# elif [ $platform = "win" ]; then
# echo "Please wait..."
# ./shshdump.exe
# mv dump.shsh myblob.dump
fi
./ticket myblob.dump myblob.plist current.ipsw -z
./validate myblob.plist current.ipsw -z
ECID=`./ticket myblob.dump myblob2.plist current.ipsw -z | grep ECID | cut -d = -f 2`
sleep 1
if [ -e "myblob.plist" ]; then
mv myblob.plist "$ECID-$model-$ios.shsh"
mv "$ECID-$model-$ios.shsh" "$desktop"
echo "BLOBS SAVED AS: $ECID-$model-$ios.shsh"
echo "Blobs were successfully saved! This file has been moved onto your Desktop!"
echo "*** Remember to change the System Date back ***"
else
echo "Did NOT succeed. First try running ./dumpblobs again (entering kDFU again if needed - usual fix), otherwise try on a different version of macOS."
fi