1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-23 07:58:09 +00:00
trezor-firmware/firmware-fingerprint.sh

19 lines
322 B
Bash
Raw Normal View History

#!/bin/bash
2016-07-03 11:53:20 +00:00
set -e
2014-07-01 19:42:00 +00:00
if [ -z "$1" ]; then
echo "Please provide filename as argument"
exit 1
fi
MAGIC=`head -c +4 $1`
if [ "x$MAGIC" != "xTRZR" ]; then
echo "Missing magic characters 'TRZR', invalid firmware"
exit 1
fi
echo "---------------------"
echo "Firmware fingerprint:"
tail -c +257 $1 | sha256sum