1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-10-11 02:19:21 +00:00
trezor-firmware/firmware-fingerprint.sh

12 lines
203 B
Bash
Raw Normal View History

#!/bin/bash
MAGIC=`head -c +4 $1`
if [ "x$MAGIC" != "xTRZR" ]; then
echo "Missing magic characters 'TRZR', invalid firmware"
exit 1
fi
echo "Firmware fingerprint:"
tail -c +257 $1 | sha256sum