From 05c243d29b03ff2147be5e33eec518389a20d4bd Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Mon, 26 Sep 2016 12:28:06 +0200 Subject: [PATCH] add possibility to skip check in firmware_update --- trezorctl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/trezorctl b/trezorctl index 61461f521..3045942b6 100755 --- a/trezorctl +++ b/trezorctl @@ -309,11 +309,11 @@ class Commands(object): args.url = 'https://wallet.trezor.io/' + release['url'] return self.firmware_update(args) - if fp[:8] == b'54525a52': - fp = binascii.unhexlify(fp) - - if fp[:4] != b'TRZR': - raise Exception("TREZOR firmware header expected") + if not args.skip_check: + if fp[:8] == b'54525a52': + fp = binascii.unhexlify(fp) + if fp[:4] != b'TRZR': + raise Exception("TREZOR firmware header expected") print("Please confirm action on device...") @@ -469,6 +469,7 @@ class Commands(object): (('-f', '--file'), {'type': str}), (('-u', '--url'), {'type': str}), (('-n', '--version'), {'type': str}), + (('-s', '--skip-check'), {'action': 'store_true', 'default': False}), ) def list_usb():