-
-
Save illucent/307d8b97e8620ad9739ba34816be3074 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
# This script will check an IPA and determine if the specified UDID is in the embedded provisioning profile | |
IPA=$1 | |
UDID=$2 | |
if [ $# -eq "1" ] | |
then | |
echo "Please specify a UDID to check for." | |
elif [ $# -eq "2" ] | |
then | |
mkdir -p /tmp/unzippedIPAs | |
cd /tmp/unzippedIPAs | |
unzip -p $IPA Payload/*/embedded.mobileprovision | grep -qo --binary-files=text $UDID; RESULT=$?; | |
if [ $RESULT -eq 1 ] | |
then | |
tput setaf 1 | |
tput bold | |
echo -e "No Match Found." | |
tput sgr0 | |
else | |
tput setaf 2 | |
tput bold | |
echo "UDID Found!" | |
tput sgr0 | |
fi | |
rm -rf /tmp/unzippedIPAs | |
else | |
echo "Usage: ./checkipaforudid [IPAName.ipa] [UDID]" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment