Last active
January 23, 2018 18:43
-
-
Save elmimmo/9206672 to your computer and use it in GitHub Desktop.
Script to schedule automated batch-downloading of all SHSH blobs from Apple that it's currently signing for all iOS devices you own. You are expected to have ran TinyUmbrella at east once. Requires https://github.com/Neal/savethemblobs.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
renice 19 -p $$ | |
if ! $(python -c "import sys, os, argparse, requests, json, six" &> /dev/null); then | |
echo "ERROR: Required Python modules are missing" >&2 | |
exit 1 | |
fi | |
: ${SHSH_DIR:="${HOME}/.shsh/"} | |
SAVEIFS=$IFS | |
IFS=$(echo -en "\n\b") | |
for FILE in "${SHSH_DIR}.known_devices/"*.plist | |
do | |
ECID="$(grep -A1 UniqueChipID "$FILE" \ | |
| tail -1 \ | |
| sed 's/^.*\<integer\>//;s/\<\/integer\>.*$//;')" | |
PRODUCTTYPE="$(grep -A1 ProductType "$FILE" \ | |
| tail -1 \ | |
| sed 's/^.*\<string\>//;s/\<\/string\>.*$//;')" | |
DEVICENAME="$(grep -A1 DeviceName "$FILE" \ | |
| tail -1 \ | |
| sed 's/^.*\<string\>//;s/\<\/string\>.*$//;')" | |
echo "※ Downloading SHSH blobs for $DEVICENAME" | |
python ${SHSH_DIR}savethemblobs.py \ | |
--save-dir "$SHSH_DIR" \ | |
$ECID $PRODUCTTYPE | |
done | |
IFS=$SAVEIFS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
$SHSH_DIR
.so that it points to the path where savethemblobs.sh resides. Note that savethemblobs.sh also expects savethemblobs.py from https://github.com/Neal/savethemblobs to exist in the same folder you are saving SHSH blobs in.
4. Open Terminal and type:
The script will run every wednesday at 12h noon. Edit the appropriate segment of local.shared.savethemblobs.plist to change that schedule.