mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 10:38:42 +01:00
Merge pull request #4035
0f63504
Changed bitrpc.py's raw_input to getpass for passwords to conceal characters during command line input. Getpass is in Python stdlib so no additional dependencies required. (Eric S. Bullington)
This commit is contained in:
commit
91c601c54a
@ -1,6 +1,7 @@
|
||||
from jsonrpc import ServiceProxy
|
||||
import sys
|
||||
import string
|
||||
import getpass
|
||||
|
||||
# ===== BEGIN USER SETTINGS =====
|
||||
# if you do not set these you will be prompted for a password for every command
|
||||
@ -302,7 +303,7 @@ elif cmd == "validateaddress":
|
||||
|
||||
elif cmd == "walletpassphrase":
|
||||
try:
|
||||
pwd = raw_input("Enter wallet passphrase: ")
|
||||
pwd = getpass.getpass(prompt="Enter wallet passphrase: ")
|
||||
access.walletpassphrase(pwd, 60)
|
||||
print "\n---Wallet unlocked---\n"
|
||||
except:
|
||||
@ -310,8 +311,8 @@ elif cmd == "walletpassphrase":
|
||||
|
||||
elif cmd == "walletpassphrasechange":
|
||||
try:
|
||||
pwd = raw_input("Enter old wallet passphrase: ")
|
||||
pwd2 = raw_input("Enter new wallet passphrase: ")
|
||||
pwd = getpass.getpass(prompt="Enter old wallet passphrase: ")
|
||||
pwd2 = getpass.getpass(prompt="Enter new wallet passphrase: ")
|
||||
access.walletpassphrasechange(pwd, pwd2)
|
||||
print
|
||||
print "\n---Passphrase changed---\n"
|
||||
|
Loading…
Reference in New Issue
Block a user