2019-08-26 12:50:28 +00:00
|
|
|
#!/bin/sh
|
|
|
|
RETURN=0
|
|
|
|
|
2022-06-17 12:24:27 +00:00
|
|
|
EXCEPTIONS="decred|omni|ripple|dash|TEXT_MARGIN_LEFT|dash_width|dashlane|flo|mnemonic|meter|refuse|fused|enemy|cinema|syntaxerror|mix|palm|UdesRsK|kcc|derive_cardano|ntity|gather|bmc|cloudflare"
|
2021-05-25 14:02:01 +00:00
|
|
|
|
2019-08-26 12:50:28 +00:00
|
|
|
# dump all coins except the first 3 (Bitcoin, Testnet, Regtest)
|
2021-05-25 14:02:01 +00:00
|
|
|
ALTCOINS=$(./common/tools/cointool.py dump -l -p -t | grep '"name"' | cut -d '"' -f 4 | tail -n +4)
|
|
|
|
# split on newlines only
|
|
|
|
OLDIFS=$IFS
|
|
|
|
IFS="
|
|
|
|
"
|
|
|
|
for altcoin in $ALTCOINS; do
|
2019-08-26 12:50:28 +00:00
|
|
|
# echo :"$altcoin":
|
2021-05-25 14:02:01 +00:00
|
|
|
if strings "$1" | grep -i "$altcoin" | grep -Evi "$EXCEPTIONS" ; then
|
2019-08-26 12:50:28 +00:00
|
|
|
RETURN=1
|
|
|
|
fi
|
|
|
|
done
|
2021-05-25 14:02:01 +00:00
|
|
|
IFS=$OLDIFS
|
2019-08-26 12:50:28 +00:00
|
|
|
|
2022-07-25 18:17:28 +00:00
|
|
|
if [ $RETURN -ne 0 ]; then
|
|
|
|
echo "ERROR: Altcoin strings found in Bitcoin-only firmware."
|
|
|
|
fi
|
2019-08-26 12:50:28 +00:00
|
|
|
exit $RETURN
|