You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implements bitcoin#7442 by adding an option `-stdin` which reads
additional arguments from stdin, one per line.
For example
```bash
echo -e "mysecretcode\n120" | src/bitcoin-cli -stdin walletpassphrase
echo -e "walletpassphrase\nmysecretcode\n120" | src/bitcoin-cli -stdin
```
Copy file name to clipboardExpand all lines: src/bitcoin-cli.cpp
+12-9Lines changed: 12 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -43,6 +43,7 @@ std::string HelpMessageCli()
43
43
strUsage += HelpMessageOpt("-rpcuser=<user>", _("Username for JSON-RPC connections"));
44
44
strUsage += HelpMessageOpt("-rpcpassword=<pw>", _("Password for JSON-RPC connections"));
45
45
strUsage += HelpMessageOpt("-rpcclienttimeout=<n>", strprintf(_("Timeout during HTTP requests (default: %d)"), DEFAULT_HTTP_CLIENT_TIMEOUT));
46
+
strUsage += HelpMessageOpt("-stdin", _("Read extra arguments from standard input, one per line until EOF/Ctrl-D (recommended for sensitive information such as passphrases)"));
46
47
47
48
return strUsage;
48
49
}
@@ -232,15 +233,17 @@ int CommandLineRPC(int argc, char *argv[])
0 commit comments