Skip to content

Commit

Permalink
Added encryptwallet call to bitrpc.py
Browse files Browse the repository at this point in the history
This was the only call requiring password input which was still missing. Much useful to avoid leaving a plain text passphrase in the shell log.
  • Loading branch information
dllud committed Jun 17, 2014
1 parent 529047f commit 7ad720d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions contrib/bitrpc/bitrpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@
print access.backupwallet(path)
except:
print "\n---An error occurred---\n"

elif cmd == "encryptwallet":
try:
pwd = getpass.getpass(prompt="Enter passphrase: ")
pwd2 = getpass.getpass(prompt="Repeat passphrase: ")
if pwd == pwd2:
access.encryptwallet(pwd)
print "\n---Wallet encrypted. Server stopping, restart to run with encrypted wallet---\n"
else:
print "\n---Passphrases do not match---\n"
except:
print "\n---An error occurred---\n"

elif cmd == "getaccount":
try:
Expand Down

0 comments on commit 7ad720d

Please sign in to comment.