浏览代码

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.
tags/v0.15.1
dllud 7 年前
父节点
当前提交
7ad720d890
共有 1 个文件被更改,包括 12 次插入0 次删除
  1. 12
    0
      contrib/bitrpc/bitrpc.py

+ 12
- 0
contrib/bitrpc/bitrpc.py 查看文件

@@ -22,6 +22,18 @@ if cmd == "backupwallet":
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:

正在加载...
取消
保存