Created
September 15, 2015 04:43
-
-
Save 8enet/ed3c3fbedc1e107304e4 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 | |
mkdir `pwd`/.temp_for_certificate | |
cd `pwd`/.temp_for_certificate | |
count=0 | |
while [ -n "$1" ] | |
do | |
cd .. | |
curPath=$1 | |
if [[ $curPath =~ ^//* ]]; then | |
curPath=$1 | |
else | |
curPath=`pwd`"/"$1 | |
fi | |
count=$[$count+1] | |
echo "(#$count) "`basename "$curPath"`":" | |
echo "" | |
cd `pwd`/.temp_for_certificate | |
aapt dump badging $curPath | grep versionCode # 输出apk版本信息 | |
echo "" | |
path=`jar tf "$curPath" | grep RSA` #查找apk中RSA文件 | |
jar xf $curPath $path #把RSA文件解压出来 | |
keytool -printcert -file $path #查看指纹证书 | |
rm -r $path #删除之前解压的文件 | |
echo "--------------------------------------------" | |
shift | |
done | |
cd .. | |
rm -r `pwd`/.temp_for_certificate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment