stdin is accepted as password
KeePass Command Line Interface
Brought to you by:
hightowe,
perlsaiyan
Users should not be tempted to do something like this:
$ echo mypassword | kpcli --kdb my.kdb
I'm not a perl expert... but eating all the keys right before displaying the password prompt, would solve it:
*** 2711,2720 ****
--- 2711,2723 ----
}
$|=1; # Needed to flush STDOUT on Windows cmd prior to calling ReadMode
ReadMode('noecho');
ReadMode('raw');
+
+ while (defined ReadKey(-1)) {}; # eats up keys in buffer
+
my $master_pass = '';
print $prompt;
CHAR: while (1) {
my $c;
do {
otherwise, it could be nice to be able to send shell commands to stdin, ie:
This provides a work-around to the annoying keepass feature that entries cant be stored in /.