mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 02:25:40 +01:00
Added encryptwallet call to bitrpc.py
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.
This commit is contained in:
parent
529047fcd1
commit
7ad720d890
@ -23,6 +23,18 @@ if cmd == "backupwallet":
|
|||||||
except:
|
except:
|
||||||
print "\n---An error occurred---\n"
|
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":
|
elif cmd == "getaccount":
|
||||||
try:
|
try:
|
||||||
addr = raw_input("Enter a Bitcoin address: ")
|
addr = raw_input("Enter a Bitcoin address: ")
|
||||||
|
Loading…
Reference in New Issue
Block a user