aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/hash_browser_app.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/hash_browser_app.sh b/scripts/hash_browser_app.sh
new file mode 100755
index 00000000..932e2453
--- /dev/null
+++ b/scripts/hash_browser_app.sh
@@ -0,0 +1,5 @@
+#!/usr/bin/env bash
+PACKAGE_NAME="$(aapt dump badging "$1" | grep package: | grep -Eo " name='[a-zA-Z0-9_\.]*" | cut -c8-)"
+HASH="$(apksigner verify --print-certs "$1" | grep "#1 certificate SHA-256" | grep -Eo "[a-f0-9]{64}" | tr -d '\n' | xxd -r -p | base64)"
+echo "\"$PACKAGE_NAME\" to \"$HASH\""
+