Created
June 28, 2022 22:55
-
-
Save rodnt/ae8a44496854bffa30126ec422c710ef to your computer and use it in GitHub Desktop.
bash script to verify CVE-2017-13156
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 | |
me=`basename "$0"` | |
echo ":: verify CVE-2017-13156 ::" | |
echo ":: USAGE bash $me <filename_.apk> " | |
command -v apksigner >/dev/null 2>&1 || { echo >&2 "apksigner not in \$PATH. Aborting."; exit 1; } | |
command -v apktool >/dev/null 2>&1 || { echo >&2 "apktool not in \$PATH. Aborting."; exit 1; } | |
file=$1 | |
echo "verifing signatures" | |
apksigner verify -verbose $file | head -50 | grep -i 'true' | |
echo "verify minsdk version" | |
apktool -f -s d $file | |
apk_name=$(basename $file .apk) | |
cat $apk_name/apktool.yml | grep -i minsdk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment