With this the passphrase can also be entered in-program to avoid it showing up in the linux bash history and the likes by default
Removed passphrase as mandatory cli parameter #4144
pull insunaa wants to merge 1 commits into bitcoin:master from insunaa:enter_passphrase_via_stdin changing 1 files +12 −0-
insunaa commented at 11:21 AM on May 7, 2014: none
-
17d53ef7c5
Removed passphrase as mandatory cli parameter
The passphrase can now also be entered in-program to avoid it showing up in the linux bash history and the likes by default
-
BitcoinPullTester commented at 11:58 AM on May 7, 2014: none
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/17d53ef7c55fe0118860159c2012f665c56040d8 for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.
-
in src/rpcclient.cpp:None in 17d53ef7c5
148 | @@ -149,6 +149,18 @@ Array RPCConvertValues(const std::string &strMethod, const std::vector<std::stri 149 | if (strMethod == "listtransactions" && n > 2) ConvertTo<boost::int64_t>(params[2]); 150 | if (strMethod == "listaccounts" && n > 0) ConvertTo<boost::int64_t>(params[0]); 151 | if (strMethod == "walletpassphrase" && n > 1) ConvertTo<boost::int64_t>(params[1]); 152 | + if (strMethod == "walletpassphrase" && n < 1) 153 | + { 154 | + std::cout<<"Enter passphrase"<<std::endl; 155 | + std::string strPassphrase; 156 | + std::string strTimeOut; 157 | + std::getline(cin, strPassphrase);
laanwj commented at 12:45 PM on May 7, 2014:Will this echo the password to the screen while typing?
insunaa commented at 12:47 PM on May 7, 2014:Yes it will. I don't see how this would make it any more insecure from the password being in the startup parameter, where it is just as visible to any passerby, tho. The idea of this addition was to make the password disappear from log-files, not to make it invisible to people in the vicinity
laanwj commented at 12:54 PM on May 7, 2014:I'd suggest using
contrib/bitrpc/bitrpc.py walletpassphrase, it asks for the password in a secure way that won't end up in history and won't be visible by passers-by.
insunaa commented at 12:58 PM on May 7, 2014:That is a good point. I was assuming more users would use bitcoind than the python rpc client, but I don't have any metrics to support that assumption. Thank you.
laanwj commented at 1:09 PM on May 7, 2014:Yeah - Python is superior for this. Implementing the equivalent in c++ would either pull in extra dependencies or be very OS-specific.
insunaa commented at 1:13 PM on May 7, 2014:Well, the suggestion was worth a try. Thank you for your time!
sipa commented at 2:25 PM on May 7, 2014: memberWild idea: add an RPC getrpcinfo, which returns structured information (number of arguments, types, help text) about all known RPC calls.
bitrpc.py could then be extended with tab-completion, automatic type conversion, batch requests, ... and we can maybe phase out bitcoin-cli :)
insunaa commented at 1:13 PM on May 8, 2014: none@sipa Well... I tried something like this now, but it's incredibly static. Also because I'm not very familiar with JSON it might be proper useless: https://github.com/d3rrial/bitcoin/blob/getrpcinfo_rpc_command/src/rpcserver.cpp https://github.com/d3rrial/bitcoin/commit/9d06e8ddd962f7e2546ae0798a618bc182117733
It builds on mint linux 16 just fine and does what it's supposed to Any recommendations? Shall I try to make it less static or did I make some grave error with th JSON formatting?
Edit: Well THAT was pointless, the first commit wasn't even valid JSON >_<
It's valid JSON now tho: https://github.com/d3rrial/bitcoin/commit/f3a9790223091c52c1c5d698183d636d1f066fd0
laanwj commented at 8:10 AM on May 9, 2014: memberAs the consensus seems to be that a better solution is to improve the Python script, I'm closing this.
Re: 'data-driven RPCConvertValues' (or, 'RPC introspection'), could be a good idea. Maybe open a new issue for it.
laanwj closed this on May 9, 2014DrahtBot locked this on Sep 8, 2021Contributors
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-29 03:16 UTC
More mirrored repositories can be found on mirror.b10c.me