aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorEric S. Bullington <eric.s.bullington@gmail.com>2014-04-09 10:01:47 -0400
committerEric S. Bullington <eric.s.bullington@gmail.com>2014-04-09 10:01:47 -0400
commit0f6350446344059d4818a94475cf6e21850dc198 (patch)
treea9d75d24fe5ab528846722642201c73a4a9cd30d /contrib
parent85bba09bfdbbcee6bdd372afe5e004a827d0d774 (diff)
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.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/bitrpc/bitrpc.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/bitrpc/bitrpc.py b/contrib/bitrpc/bitrpc.py
index a840bc2020..a84d7e34dd 100644
--- a/contrib/bitrpc/bitrpc.py
+++ b/contrib/bitrpc/bitrpc.py
@@ -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"