More args and shortcuts
This commit is contained in:
parent
f7aa0b52af
commit
8792fa27a9
3
unix/.gitignore
vendored
3
unix/.gitignore
vendored
@ -9,3 +9,6 @@ ENV
|
||||
|
||||
snapshot-*.png
|
||||
movie-*.gif
|
||||
|
||||
# this file is created once you import an HSM policy
|
||||
unix/work/hsm-policy.json
|
||||
|
||||
@ -33,7 +33,9 @@ wallet (on testnet, always with the same seed). But there are other options:
|
||||
- `--nick Name` => set the pre-login nickname for the Coldcard so it will be shown
|
||||
- `--delay X` => set the "login countdown" value to X minutes, also force login
|
||||
- `--set key=val` => preset the setting 'key' to be 'val'
|
||||
- `--users` => preset a few users: "totp", "hotp" and "pw"
|
||||
- `--msg` => jump to message signing from SD card menu item
|
||||
- `--hsm` => enable existing HSM policy
|
||||
|
||||
See `frozen-modules/sim-settings.py` for the details of settings-related options.
|
||||
|
||||
|
||||
@ -70,3 +70,16 @@ if '--msg' in sys.argv:
|
||||
numpad.inject('4')
|
||||
numpad.inject('8')
|
||||
numpad.inject('y')
|
||||
|
||||
if '--hsm' in sys.argv:
|
||||
# Sign from MicoSD card
|
||||
from main import numpad
|
||||
numpad.inject('3')
|
||||
numpad.inject('y')
|
||||
for ch in '123460':
|
||||
numpad.inject(ch)
|
||||
|
||||
# not best place for this
|
||||
import hsm
|
||||
hsm.POLICY_FNAME = hsm.POLICY_FNAME.replace('/flash/', '')
|
||||
|
||||
|
||||
@ -124,4 +124,21 @@ if '--set' in sys.argv:
|
||||
except: pass
|
||||
sim_defaults[k] = v
|
||||
|
||||
if '--users' in sys.argv:
|
||||
sim_defaults['usr'] = {
|
||||
# time based OTP
|
||||
# otpauth://totp/totp?secret=UR4LAZMTSJOF52FE&issuer=Coldcard%20simulator
|
||||
'totp': [1, 'UR4LAZMTSJOF52FE', 0],
|
||||
|
||||
# OBSCURE: counter-based, not time
|
||||
# - no way to get your counter in sync w/ simulator
|
||||
# otpauth://hotp/hotp?secret=DBDCOKLQKM6BAKXD&issuer=Coldcard%20simulator
|
||||
'hotp': [2, 'DBDCOKLQKM6BAKXD', 0],
|
||||
|
||||
# password
|
||||
# pw / 1234abcd
|
||||
'pw': [3, 'THNUHHFTG44NLI4EC7H7D6MU5AYMC3B3ER2ZFIBHQVUBOLGADA7Q', 0],
|
||||
}
|
||||
|
||||
|
||||
# EOF
|
||||
|
||||
Loading…
Reference in New Issue
Block a user