Skip to content

Instantly share code, notes, and snippets.

@bitmess
Created June 5, 2017 06:49
Show Gist options
  • Save bitmess/45e539eca98c6b6199139504a89fec69 to your computer and use it in GitHub Desktop.
Save bitmess/45e539eca98c6b6199139504a89fec69 to your computer and use it in GitHub Desktop.
find iOS app ipa's expiration
#!/bin/sh
names=([0]="Demo1" [1]="Demo2")
urls=([0]="http://www.baidu.com/Demo1.ipa" [1]="http://www.baidu.com/Demo2.ipa")
rm -f ./1.txt
RES=""
function loop()
{
rm -rf ./1
rm -f 1.zip
rm -f 1.plist
rm -f embedded.mobileprovision
curl -o 1.zip $1
unzip -q 1.zip -d 1
cp ./1/Payload/*/embedded.mobileprovision .
security cms -D -i embedded.mobileprovision > ./1.plist
RES=`/usr/libexec/PListBuddy -c "Print :ExpirationDate" ./1.plist`
}
for k in "${!urls[@]}"
do
echo "\n"
echo "\n"
echo "\n"
echo "\n"
echo "\n"
echo "\n"
echo "${k} ${names[${k}]} start.........................................................................."
loop "${urls[${k}]}"
word=`echo "${k} ${names[${k}]} $RES"`
echo "${word}" >> 1.txt
done
cat 1.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment