1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-23 06:48:16 +00:00
trezor-firmware/firmware-fingerprint.sh
2014-07-03 01:20:34 +02:00

18 lines
315 B
Bash
Executable File

#!/bin/bash
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