wmacevoy / brainwallet

brain-wallet-tools
4 stars 4 forks source link

secret + master key option fix #12

Closed rdunski closed 5 years ago

rdunski commented 5 years ago

Running the following command:

bw --secret "..." --master

And using just secret key:

 "always traffic bacon first crystal pistol sadness state visa misery degree nature fork glow mango"

Causes this error to show up:

Traceback (most recent call last):
  File "/home/esquire/Projects/brainwallet/brainwallet/brainwallet.py", line 266, in <module>
    main()
  File "/home/esquire/Projects/brainwallet/brainwallet/brainwallet.py", line 263, in main
    brainWallet.cli(sys.argv[1:])
  File "/home/esquire/Projects/brainwallet/brainwallet/brainwallet.py", line 229, in cli
    if arg == cmd: print(self.getSecret())
  File "/home/esquire/Projects/brainwallet/brainwallet/brainwallet.py", line 86, in getSecret
    return self.getKey(0)
  File "/home/esquire/Projects/brainwallet/brainwallet/brainwallet.py", line 95, in getKey
    self._keys[index] = self._getShamir().getKey(index)
  File "/home/esquire/Projects/brainwallet/brainwallet/shamir.py", line 130, in getKey
    raise ValueError("only %d of minimum %s keys" % (len(xs),self._minimum))
ValueError: only 0 of minimum 2 keys

Running the command (including "=" just to test):

bw --secret="..." --master

Gives this error:

Traceback (most recent call last):
  File "/home/esquire/Projects/brainwallet/brainwallet/brainwallet.py", line 266, in <module>
    main()
  File "/home/esquire/Projects/brainwallet/brainwallet/brainwallet.py", line 263, in main
    brainWallet.cli(sys.argv[1:])
  File "/home/esquire/Projects/brainwallet/brainwallet/brainwallet.py", line 257, in cli
    seed = self.getSeed()
  File "/home/esquire/Projects/brainwallet/brainwallet/brainwallet.py", line 132, in getSeed
    iterations=self.PBKDF2_ROUNDS
AttributeError: 'BrainWallet' object has no attribute 'PBKDF2_ROUNDS'
rdunski commented 5 years ago

fixed with bcfce45